doctrine:generate:entities destination folder error on Windows#42
Closed
schniper wants to merge 1 commit intosymfony:masterfrom
schniper:master
Closed
doctrine:generate:entities destination folder error on Windows#42schniper wants to merge 1 commit intosymfony:masterfrom schniper:master
schniper wants to merge 1 commit intosymfony:masterfrom
schniper:master
Conversation
… substraction of slash delimited $path doesn't work.
Contributor
|
This looks good. Fabien, it can be merged! |
Member
|
I have done the change directly into the Bundle class. |
Contributor
Author
|
The change has not appeared in the last few updates. Have you forgotten about it or it's on its way? |
Member
jderusse
pushed a commit
to jderusse/symfony
that referenced
this pull request
Mar 30, 2020
This PR was merged into the master branch. Discussion ---------- Fixed wrong validator script name in README Commits ------- 5860e93 Fixed wrong validator script name in README
fabpot
added a commit
that referenced
this pull request
Sep 19, 2020
This PR was merged into the 5.2-dev branch.
Discussion
----------
[VarDumper] Support for ReflectionAttribute
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | not needed
VarDumper currently does not understand that certain reflection objects might have attributes attached to it. Dumping a `ReflectionAttribute` just yields `ReflectionAttribute {#4711}` which is not really helpful. This PR attempts to fix this.
```
ReflectionAttribute {#4711
name: "App\MyAttribute"
arguments: array:2 [
0 => "one"
"extra" => "hello"
]
}
```
While working on this, I noticed that class constants (which can be reflected on since PHP 7.1) are just dumped as plain values, so I've also added a caster for `ReflectionClasConstant` as bonus.
The full output for the `LotsOfAttributes` fixture class that is included with is PR looks like this:
<details>
```
^ ReflectionClass {#7
+name: "Symfony\Component\VarDumper\Tests\Fixtures\LotsOfAttributes"
modifiers: "final"
implements: []
constants: array:1 [
0 => ReflectionClassConstant {#20
+name: "SOME_CONSTANT"
+class: "Symfony\Component\VarDumper\Tests\Fixtures\LotsOfAttributes"
modifiers: "public"
value: "some value"
attributes: array:2 [
0 => ReflectionAttribute {#33
name: "Symfony\Component\VarDumper\Tests\Fixtures\RepeatableAttribute"
arguments: array:1 [
0 => "one"
]
}
1 => ReflectionAttribute {#34
name: "Symfony\Component\VarDumper\Tests\Fixtures\RepeatableAttribute"
arguments: array:1 [
0 => "two"
]
}
]
}
]
properties: array:1 [
"someProperty" => ReflectionProperty {#19
+name: "someProperty"
+class: "Symfony\Component\VarDumper\Tests\Fixtures\LotsOfAttributes"
modifiers: "private"
attributes: array:1 [
0 => ReflectionAttribute {#30
name: "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
arguments: array:2 [
0 => "one"
"extra" => "hello"
]
}
]
}
]
methods: array:1 [
"someMethod" => ReflectionMethod {#21
+name: "someMethod"
+class: "Symfony\Component\VarDumper\Tests\Fixtures\LotsOfAttributes"
returnType: "void"
parameters: {
$someParameter: ReflectionParameter {#28
+name: "someParameter"
position: 0
attributes: array:1 [
0 => ReflectionAttribute {#42
name: "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
arguments: array:1 [
0 => "three"
]
}
]
typeHint: "string"
}
}
attributes: array:1 [
0 => ReflectionAttribute {#27
name: "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
arguments: array:1 [
0 => "two"
]
}
]
modifiers: "public"
}
]
attributes: array:1 [
0 => ReflectionAttribute {#22
name: "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
arguments: []
}
]
extra: {
file: "./src/Symfony/Component/VarDumper/Tests/Fixtures/LotsOfAttributes.php"
line: "15 to 28"
isUserDefined: true
}
}
```
</details>
Commits
-------
34dbf01 [VarDumper] Support for ReflectionAttribute.
chalasr
pushed a commit
to chalasr/symfony
that referenced
this pull request
Sep 24, 2020
…ects (symfony#42) * Add a blocker to avoid using HttpFoundation request and response objects * Stop setting request & response httpfoundation object
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals
6621
hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Right now, running the command from the root of a sandbox, would generate entities in /src/Application/MyBundle/Application/MyBundle/Entity.
The cause is a substring replace on string paths using distinct separators.