jan-swiecki / php-simple-annotations Goto Github PK
View Code? Open in Web Editor NEWSimple PHP annotations doc block parser
License: MIT License
Simple PHP annotations doc block parser
License: MIT License
#90:
$this->parameters[$match[1]] = array_merge((array)$this->parameters[$match[1]], (array)$match[2]);
$match[2] should be parsed first before adding to array (as is done in the else):
$this->parameters[$match[1]] = array_merge((array)$this->parameters[$match[1]], (array)$this->parseValue($match[2]));
Issue reproducible by setting these annotations:
/*
* @Lalala ["somejsonarray", "2"]
* @Lalala ["anotherjsonarray", "3"]
*/
Second param would be string instead of json parsed array
It seems that in newer php json_decode
behaves differently. Decoding @x tRuE
with Reader
yields string value. I think this is correct behaviour so I will modify test suit and @x tRuE
will represent string property.
I like the Doctrine way to get ORM config for DB cols, I would like to implement same thing in my project.
So I searched for annotation parsing solution and found your great repo!
However it seems I cannot parse class properties with this tool, could we add this feature?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.