[DC-936] json schema import broken Created: 22/Nov/10 Updated: 22/Dec/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | File Parser |
| Affects Version/s: | 1.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Mael Nison | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
PHP 5.3.3-1ubuntu9.1 |
||
| Attachments: |
|
| Description |
|
With a valid Json file : It's due to this line, line, in Doctrine/Parser/Json.php (#65) : It should be: Because casting the result as array will only affect the top-level element. You must use the second parameter of json_decode() to force every objects (including sub-objects) to be converted to indexed arrays. |
| Comments |
| Comment by Mael Nison [ 22/Nov/10 ] |
|
A try to import this file should fail. |
| Comment by Brian Fenton [ 22/Dec/10 ] |
|
I've submitted a pull request w/patch and unit test for this issue using the fix above. I had the same problem in my code on OS X 10.6.4, PHP 5.3.2 |
[DC-392] Let the parser ignore .* (hidden) files Created: 02/Jan/10 Updated: 08/Jun/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | File Parser |
| Affects Version/s: | 1.1.6 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major |
| Reporter: | Alessandro Vermeulen | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When generating models from yml files starting with a `.' such as temporary files from certain editors and meta files from OS X are also parsed by the importer. I do not see any reasons too include these hidden files in parsing as they are hidden for a purpose. And there would be no point in deliberately using hidden files for your config files. Also see: |
| Comments |
| Comment by Alessandro Vermeulen [ 02/Jan/10 ] |
|
Added affected versions. |
| Comment by Jonathan H. Wage [ 08/Jun/10 ] |
|
We can include this fix in 1.2.3, does anyone have a patch? If not I'll try and hunt down the offending code and patch it. Not sure where it is off the top of my head anymore |