Skip to content

Test entity type field with multiple=true giving back array and array collection #23928

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5,650 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
5650 commits
Select commit Hold shift + click to select a range
9839140
[TwigBundle] Commands as a service
ro0NL Jul 15, 2017
68d9df6
feature #23519 [TwigBundle] Commands as a service (ro0NL)
fabpot Jul 22, 2017
4e25a61
bug #23618 [Routing] allow HEAD method to be defined first (DavidBadura)
fabpot Jul 22, 2017
44d1162
feature #23451 [Cache] Add (filesystem|phpfiles) cache (adapter|simpl…
nicolas-grekas Jul 22, 2017
1ac3031
Merge branch '3.4'
nicolas-grekas Jul 22, 2017
7695112
feature #22317 [Console] Make SymfonyQuestionHelper::ask optional by …
fabpot Jul 20, 2017
445c56a
Remove unused mocks/vars
ro0NL Jul 22, 2017
07ff4dd
Remove unused prop + added @deprecated
ro0NL Jul 22, 2017
a2d3653
minor #23627 Remove unused mocks/vars (ro0NL)
ogizanagi Jul 22, 2017
41bd1e5
minor #23628 Remove unused prop + added @deprecated (ro0NL)
ogizanagi Jul 22, 2017
cccc88f
[Cache] Handle unserialization failures for Memcached
nicolas-grekas Jul 21, 2017
70cc4e8
[DI] Fix test
nicolas-grekas Jul 23, 2017
95fd077
minor #23631 [DI] Fix test (nicolas-grekas)
nicolas-grekas Jul 23, 2017
0763898
bug #23588 [WebProfilerBundle] Display trace and context in the logge…
fabpot Jul 23, 2017
8630abe
[Form] Allow pass filter callback to delete_empty option.
Koc Nov 11, 2016
88666dd
Fix merge
Jul 23, 2017
9fd425e
Suggest using quotes instead of Yaml::PARSE_KEYS_AS_STRINGS
GuilhemN Jul 23, 2017
bfd9c2c
Removed references for non existent validator constraints
Koc Jul 23, 2017
1b56b2b
[VarDumper] Remove dead code
nicolas-grekas Jul 24, 2017
a00b05e
minor #23635 [Yaml] Suggest using quotes instead of Yaml::PARSE_KEYS_…
fabpot Jul 24, 2017
c431fd9
minor #23637 [VarDumper] Remove dead code (nicolas-grekas)
nicolas-grekas Jul 24, 2017
945596b
minor #23636 [Form] Removed references for non existent validator co…
ogizanagi Jul 24, 2017
fe48ab1
[Form] Static call TimezoneType::getTimezones
ro0NL Jul 24, 2017
320cf40
[DI] Fix resetting private services
nicolas-grekas Jul 24, 2017
0d5012d
[VarDumper] Dont use Stub objects for arrays
nicolas-grekas Jul 24, 2017
e6f6150
bug #23645 [DI] Fix resetting private services (nicolas-grekas)
ogizanagi Jul 25, 2017
f3da6cf
[DI] Fix using private services in expressions
nicolas-grekas Jul 24, 2017
5e89278
minor #23652 [Form] Static call TimezoneType::getTimezones (ro0NL)
ogizanagi Jul 25, 2017
a3f8fb0
bug #23654 [DI] Fix using private services in expressions (nicolas-gr…
nicolas-grekas Jul 26, 2017
8907bc4
bug #23615 [Cache] Handle serialization failures for Memcached (nicol…
nicolas-grekas Jul 26, 2017
a280e81
Merge branch '2.8' into 3.2
nicolas-grekas Jul 26, 2017
d569476
Merge branch '3.2' into 3.3
nicolas-grekas Jul 26, 2017
4a3b3be
Merge branch '3.3' into 3.4
nicolas-grekas Jul 26, 2017
c0d99d1
feature #20496 [Form] Allow pass filter callback to delete_empty opti…
fabpot Jul 26, 2017
643c54c
Merge branch '3.4'
nicolas-grekas Jul 26, 2017
21d98d4
bug #23644 [VarDumper] Dont use Stub objects for arrays - lower GC pr…
fabpot Jul 26, 2017
8b11997
[DI] cleanup
nicolas-grekas Jul 26, 2017
ceb4393
Merge branch '2.8' into 3.2
nicolas-grekas Jul 26, 2017
34c68f9
Merge branch '3.2' into 3.3
nicolas-grekas Jul 26, 2017
f9c4621
Merge branch '3.3' into 3.4
nicolas-grekas Jul 26, 2017
dd9b5eb
minor fix
nicolas-grekas Jul 26, 2017
6bbb391
Merge branch '3.3' into 3.4
nicolas-grekas Jul 26, 2017
3ea90b4
Merge branch '3.4'
nicolas-grekas Jul 26, 2017
01f05e3
minor #23672 [DI] cleanup (nicolas-grekas)
nicolas-grekas Jul 26, 2017
7b6d894
[Console][WebServerBundle] Use "exec" when possible
nicolas-grekas Jul 26, 2017
f4c5cff
[Workflow] Adding workflow name to the announce event
Nyholm Jul 19, 2017
8110598
feature #23593 [Workflow] Adding workflow name to the announce event …
lyrixx Jul 27, 2017
b5c7319
bug #23686 [Console][WebServerBundle] Use "exec" when possible (nicol…
fabpot Jul 27, 2017
0754617
[DI][ProxyManager] Pass the factory code to execute to DumperInterfac…
nicolas-grekas Jul 27, 2017
0caed93
[DI] Inline trivial private servives
nicolas-grekas Jul 26, 2017
92fa55d
[VarDumper] Keep and reuse array stubs in memory
nicolas-grekas Jul 26, 2017
03af7b9
minor #23674 [DI] Inline trivial private servives (nicolas-grekas)
fabpot Jul 28, 2017
ccfb4f2
bug #23683 [VarDumper] Keep and reuse array stubs in memory (nicolas-…
fabpot Jul 28, 2017
f20b959
minor #23693 [DI][ProxyManager] Pass the factory code to execute to D…
fabpot Jul 28, 2017
90b5519
Merge branch '2.8' into 3.2
nicolas-grekas Jul 28, 2017
3088e0a
Merge branch '3.2' into 3.3
nicolas-grekas Jul 28, 2017
531b294
Merge branch '3.3' into 3.4
nicolas-grekas Jul 28, 2017
81bce54
Merge branch '3.4'
nicolas-grekas Jul 28, 2017
3e0501a
fix merge
nicolas-grekas Jul 28, 2017
0347e5a
[Form] Add notice to upgrade to PHP v7.0.8+
nicolas-grekas Jul 28, 2017
21f1e10
fix merge
nicolas-grekas Jul 28, 2017
9c53108
Merge branch '3.2' into 3.3
nicolas-grekas Jul 28, 2017
84f4fb6
bug #23705 [Form] Add notice to upgrade to PHP v7.0.8+ (nicolas-grekas)
fabpot Jul 28, 2017
a6f44d2
fixed CS
fabpot Jul 29, 2017
33b737b
Make dump() variadic
Jul 29, 2017
15ceb18
[Bridge/ProxyManager] Relax test to allow protected factories on master
nicolas-grekas Jul 29, 2017
8c8958e
Merge branch '2.8' into 3.2
nicolas-grekas Jul 29, 2017
75c3eca
Merge branch '3.2' into 3.3
nicolas-grekas Jul 29, 2017
45a3ab9
Merge branch '3.3' into 3.4
nicolas-grekas Jul 29, 2017
4352c41
Merge branch '3.4'
nicolas-grekas Jul 29, 2017
b984d51
fix typo
nicolas-grekas Jul 29, 2017
c36262e
Merge branch '3.3' into 3.4
nicolas-grekas Jul 29, 2017
a2bd56e
Merge branch '3.4'
nicolas-grekas Jul 29, 2017
2282a6f
Bump minimal PHP version to ^5.5.9|>=7.0.8
nicolas-grekas Jul 28, 2017
2769550
improve sql explain table display
Jul 28, 2017
67ecc71
Deprecate Filesystem/LockHandler
jderusse Jul 31, 2017
57a86fb
feature #23724 [Lock] Deprecate Filesystem/LockHandler (jderusse)
fabpot Aug 1, 2017
545df8f
feature #23709 [VarDumper] Make dump() variadic (chalasr)
fabpot Aug 1, 2017
8e517f6
feature #23706 [Webprofiler] Improve sql explain table display (mimol91)
fabpot Aug 1, 2017
ee4dc20
Autoconfigure instances of ArgumentValueResolverInterface
BPScott Jul 30, 2017
ab0cbd4
updated CHANGELOG for 3.2.13
fabpot Aug 1, 2017
7ce788b
updated VERSION for 3.2.13
fabpot Aug 1, 2017
e1aabd6
Merge pull request #23736 from fabpot/release-3.2.13
fabpot Aug 1, 2017
927f950
bumped Symfony version to 3.2.14
fabpot Aug 1, 2017
bdc8ca0
updated CHANGELOG for 3.3.6
fabpot Aug 1, 2017
cb1835a
updated VERSION for 3.3.6
fabpot Aug 1, 2017
6f80cbd
Merge pull request #23738 from fabpot/release-3.3.6
fabpot Aug 1, 2017
468b44a
bumped Symfony version to 3.3.7
fabpot Aug 1, 2017
39ab789
Remove Filesystem\LockHandler
jderusse Aug 2, 2017
a63ab77
[Config] Fix checking class existence freshness
nicolas-grekas Aug 2, 2017
b98a4a3
bug #23755 [Config] Fix checking class existence freshness (nicolas-g…
ogizanagi Aug 2, 2017
103b23e
Fix comment
Aug 2, 2017
5cc1648
[DI] Generate shorter method names for class-based ids
nicolas-grekas Aug 2, 2017
1218c71
minor #23767 [DI] Generate shorter method names for class-based ids (…
fabpot Aug 2, 2017
81396c7
Removed useless argument $definition
yceruto Aug 1, 2017
584b7b4
minor #23744 [Form] Removed useless argument $definition (yceruto)
ogizanagi Aug 2, 2017
52cf765
bug #23703 Bump minimal PHP version to ^5.5.9|>=7.0.8 (nicolas-grekas)
nicolas-grekas Aug 3, 2017
a479583
minor #23765 [FrameworkBundle] Fix comment (Lctrs)
nicolas-grekas Aug 3, 2017
4860b3e
feature #23719 Autoconfigure instances of ArgumentValueResolverInterf…
nicolas-grekas Aug 3, 2017
969a207
[DependencyInjection] Deprecate autowiring service auto-registration
GuilhemN Jul 29, 2017
2454a4f
feature #23712 [DependencyInjection] Deprecate autowiring service aut…
nicolas-grekas Aug 3, 2017
b63c55c
[Yaml] Recommend using quotes instead of PARSE_KEYS_AS_STRINGS
GuilhemN May 29, 2017
d9bf253
minor #22948 [Yaml] Recommend using quotes instead of PARSE_KEYS_AS_S…
xabbuh Aug 3, 2017
d6db49a
feature #23754 [Lock] Remove Filesystem\LockHandler (jderusse)
nicolas-grekas Aug 3, 2017
6c1a5e1
Merge branch '3.3' into 3.4
nicolas-grekas Aug 3, 2017
24fc394
Merge branch '3.4'
nicolas-grekas Aug 3, 2017
2fed6f3
fix merge
nicolas-grekas Aug 3, 2017
bc22cdd
Consistently use 7 chars of sha256 for hash-based id generation
nicolas-grekas Aug 2, 2017
feb5e62
[FrameworkBundle] Warmup annotations for bundle-less controllers and …
nicolas-grekas Aug 3, 2017
ce10508
minor #23766 Consistently use 7 chars of sha256 for hash-based id gen…
fabpot Aug 3, 2017
e551237
Merge branch '2.8' into 3.3
nicolas-grekas Aug 3, 2017
0f2563c
Merge branch '3.3' into 3.4
nicolas-grekas Aug 3, 2017
257b2c9
Merge branch '3.4'
nicolas-grekas Aug 3, 2017
47c68e1
[Workflow] do not emit not needed guard events
xabbuh Aug 3, 2017
56ee4aa
better errors when security deps are missing
xabbuh Jul 21, 2017
f693fcd
bug #23638 [FrameworkBundle][Workflow] better errors when security de…
lyrixx Aug 4, 2017
9910ba1
[Workflow] feature: add getter in workflow
Jul 28, 2017
9815af3
[Yaml] Deprecate tags using colon
GuilhemN May 25, 2017
baa1e7f
minor #22913 [Yaml] Deprecate tags using colon (GuilhemN)
xabbuh Aug 4, 2017
978eca9
Merge branch '3.3' into 3.4
xabbuh Aug 4, 2017
b27c965
Merge branch '3.4'
xabbuh Aug 4, 2017
7f6a0d8
remove legacy php/const and php/object tag support
xabbuh Aug 4, 2017
2f3ac8f
allow phpdocumentor/reflection-docblock >=3.2.1
xabbuh Aug 5, 2017
6443c96
[Serializer] fix tests for Yaml component 3.4
xabbuh Aug 5, 2017
c90eba5
feature #23790 [Yaml] remove legacy php/const and php/object tag supp…
nicolas-grekas Aug 5, 2017
2b58357
minor #23795 [Serializer] fix tests for Yaml component 3.4 (xabbuh)
nicolas-grekas Aug 5, 2017
4d80864
Merge branch '3.3' into 3.4
nicolas-grekas Aug 5, 2017
6685fcb
Merge branch '3.4'
nicolas-grekas Aug 5, 2017
c099f58
bug #23776 [FrameworkBundle] Warmup annotations for bundle-less contr…
nicolas-grekas Aug 5, 2017
94956eb
Remove leading 0 in ms of date caster
maidmaid Aug 3, 2017
9d66ee4
minor #23786 [VarDumper] Remove leading 0 in microseconds of date cas…
fabpot Aug 5, 2017
3b54ce8
minor #23700 [Workflow] add getter for workflow (Simperfit)
fabpot Aug 5, 2017
d40e7e4
[Config] Enable cannotBeEmpty along with requiresAtLeastOneElement
ro0NL Oct 30, 2016
73d3d5a
feature #20361 [Config] Enable cannotBeEmpty along with requiresAtLea…
fabpot Aug 5, 2017
a12ebf7
feature #21111 [Validator] add groups support to the Valid constraint…
fabpot Aug 5, 2017
457d57b
minor #23781 [Workflow] do not emit not needed guard events (xabbuh)
fabpot Aug 5, 2017
84b6593
minor #23794 [PropertyInfo] allow phpdocumentor/reflection-docblock >…
fabpot Aug 5, 2017
259f9cc
Update Container.php: Deprecated -> @deprecated
yurii-github Aug 5, 2017
9269ee1
minor #23798 Update Container.php: Deprecated -> @deprecated (yurii-g…
Aug 6, 2017
de1dc0b
[FrameworkBundle] Commands as a service
ro0NL Jul 22, 2017
736f0d0
feature #23624 [FrameworkBundle] Commands as a service (ro0NL)
nicolas-grekas Aug 6, 2017
c377f04
Merge branch '3.4'
nicolas-grekas Aug 6, 2017
e0a6010
[HttpKernel] Remove isset call used for legacy
ogizanagi Aug 6, 2017
c35cdba
[Profiler] Fix request_collector check in main layout
ogizanagi Aug 6, 2017
a9c01dd
bug #23806 [Profiler] Fix request_collector check in main layout (ogi…
nicolas-grekas Aug 6, 2017
049785b
Merge branch '2.8' into 3.3
nicolas-grekas Aug 6, 2017
8be06c4
Merge branch '3.3' into 3.4
nicolas-grekas Aug 6, 2017
79856db
Merge branch '3.4'
nicolas-grekas Aug 6, 2017
b31542e
[FrameworkBundle] Allow micro kernel to subscribe events easily
ogizanagi Aug 6, 2017
5f637c1
Continuation of #23624
ro0NL Aug 6, 2017
266d9d3
minor #23801 Continuation of #23624 (ro0NL)
nicolas-grekas Aug 6, 2017
57e31c2
Merge branch '3.4'
nicolas-grekas Aug 6, 2017
4037009
[DI] Generate one file per service factory
nicolas-grekas Jul 24, 2017
99806c5
minor #23803 [HttpKernel] Remove isset call used for legacy (ogizanagi)
nicolas-grekas Aug 7, 2017
94b1b12
Hash cache keys on save
lstrojny Aug 2, 2017
267b016
bug #23763 [Cache] Hash cache key on save (lstrojny)
nicolas-grekas Aug 7, 2017
c254cac
[Workflow] Added an transition completed event
izzyp Apr 30, 2017
6c0e48d
feature #22587 [Workflow] Add transition completed event (izzyp)
lyrixx Aug 7, 2017
df78a73
Merge branch '3.3' into 3.4
nicolas-grekas Aug 7, 2017
3c86ff1
Merge branch '3.4'
nicolas-grekas Aug 7, 2017
3bb0a3f
[Yaml] parse inlined tags without values
xabbuh Aug 2, 2017
c9ff029
remove deprecated code
xabbuh Aug 7, 2017
b89ba29
[Debug] Trigger a deprecation when using an internal class/trait/inte…
GuilhemN Aug 6, 2017
0effd27
feature #23807 [Debug] Trigger a deprecation when using an internal c…
nicolas-grekas Aug 7, 2017
100fe4e
feature #23741 [DI] Generate one file per service factory (nicolas-gr…
fabpot Aug 7, 2017
0a61279
Fixed UPGRADE-4.0 about Container::set
lyrixx Aug 7, 2017
7511fd3
Merge branch '3.4'
nicolas-grekas Aug 7, 2017
09272ff
fix bad merge
nicolas-grekas Aug 7, 2017
6d71b77
Merge branch '3.4'
nicolas-grekas Aug 7, 2017
fea348c
fix typo
nicolas-grekas Aug 7, 2017
066bba1
Merge branch '3.4'
nicolas-grekas Aug 7, 2017
91332a0
minor #23821 Fixed UPGRADE-4.0 about Container::set (lyrixx)
nicolas-grekas Aug 8, 2017
cadbed3
[Console] Log exit codes as debug messages instead of errors
Aug 8, 2017
cd8af22
Fixed the exception page design in responsive mode
javiereguiluz Aug 8, 2017
7010f99
bug #23828 [Console] Log exit codes as debug messages instead of erro…
Aug 8, 2017
a22e839
[DI] Fix some docblocks
nicolas-grekas Aug 8, 2017
0bcc6bb
minor #23833 [DI] Fix some docblocks (nicolas-grekas)
Aug 8, 2017
e6406d2
[HttpFoundation] Remove length limit on ETag
nicolas-grekas Aug 9, 2017
81f2652
[DependencyInjection] Support local binding
GuilhemN Mar 27, 2017
fd16993
feature #22187 [DependencyInjection] Support local binding (GuilhemN)
nicolas-grekas Aug 9, 2017
8088661
Merge branch '3.4'
nicolas-grekas Aug 9, 2017
84fb318
minor #23835 [HttpFoundation] Remove length limit on ETag (nicolas-gr…
fabpot Aug 9, 2017
fea72fb
bug #23829 Fixed the exception page design in responsive mode (javier…
fabpot Aug 9, 2017
8f862b2
feature #23812 [FrameworkBundle] Allow micro kernel to subscribe even…
fabpot Aug 9, 2017
6727d41
updated CHANGELOG
fabpot Aug 9, 2017
b622d26
[Profiler] Make the validator toolbar item consistent with the form one
ogizanagi Aug 9, 2017
16eeabf
[Debug] Detect internal and deprecated methods
GuilhemN Aug 7, 2017
1a9a254
feature #23816 [Debug] Detect internal and deprecated methods (GuilhemN)
nicolas-grekas Aug 9, 2017
46b6b42
[FrameworkBundle] Catch Fatal errors in commands registration
Aug 9, 2017
9fdb5d4
Fix minors in date caster
maidmaid Aug 9, 2017
14215d8
[HttpKernel] Deprecated commands auto-registration
GuilhemN Aug 6, 2017
2536345
feature #23805 [HttpKernel] Deprecated commands auto-registration (Gu…
Tobion Aug 9, 2017
08d352a
[Debug] Correctly detect methods not from the same vendor
GuilhemN Aug 9, 2017
d90742e
bug #23839 [VarDumper] Minor fix in date caster (maidmaid)
nicolas-grekas Aug 9, 2017
01d1563
bug #23844 [Debug] Correctly detect methods not from the same vendor …
nicolas-grekas Aug 9, 2017
ff95169
Fix lock failling test
jderusse Aug 9, 2017
11f940c
bug #23757 [Yaml] parse inlined tags without values (xabbuh)
xabbuh Aug 10, 2017
1982fff
feature #23836 [FrameworkBundle] Catch Fatal errors in commands regis…
fabpot Aug 10, 2017
ac3ee2c
Merge branch '2.8' into 3.3
fabpot Aug 10, 2017
3306986
Merge branch '2.8' into 3.2
fabpot Aug 10, 2017
a670b2b
Merge branch '3.2' into 3.3
fabpot Aug 10, 2017
a1faaa1
Merge branch '3.3' into 3.4
fabpot Aug 10, 2017
334b62a
minor #23847 [Lock] Fix/lock test (jderusse)
fabpot Aug 10, 2017
685ff0e
[DI] Fix YamlDumper not dumping abstract and autoconfigure
nicolas-grekas Aug 10, 2017
e5bbf3f
[DI] Allow dumping inline services in Yaml
nicolas-grekas Aug 10, 2017
d8584e5
minor #23843 [Profiler] Make the validator toolbar item consistent wi…
fabpot Aug 10, 2017
6760127
restrict reflection doc block
ElectricMaxxx Aug 10, 2017
3d54c3b
bug #23854 [DI] Fix YamlDumper not dumping abstract and autoconfigure…
nicolas-grekas Aug 10, 2017
00897c0
feature #23855 [DI] Allow dumping inline services in Yaml (nicolas-gr…
nicolas-grekas Aug 10, 2017
9295a4f
Merge branch '3.4'
nicolas-grekas Aug 10, 2017
f534315
bug #23848 restrict reflection doc block (ElectricMaxxx)
nicolas-grekas Aug 10, 2017
72791d6
Merge branch '2.8' into 3.3
nicolas-grekas Aug 10, 2017
cc1695c
[HttpKernel] Remove convention based commands registration
Aug 10, 2017
ce4cd85
Remove hhvm compat/low PHP support in date caster tests
maidmaid Aug 10, 2017
d1c754d
Merge branch '3.3' into 3.4
nicolas-grekas Aug 10, 2017
eeaea83
fix merge
nicolas-grekas Aug 10, 2017
ff7cd4d
minor #23860 [VarDumper] Remove hhvm compat/low PHP support in date c…
nicolas-grekas Aug 11, 2017
9c29f9c
[Workflow] fixed InvalidDefinitionException message for StateMachineV…
fmata Aug 11, 2017
eea78fd
bug #23865 [Workflow] fixed InvalidDefinitionException message for St…
lyrixx Aug 11, 2017
04df283
[Console] Added a case-insensitive fallback for console command names
thanosp Aug 11, 2017
c82ec96
feature #23869 [Console] Made console command shortcuts case insensit…
Aug 12, 2017
ab9cf27
feature #23857 [HttpKernel] Remove convention based commands registra…
ogizanagi Aug 12, 2017
1bea774
[VarDumper] play nice with open_basedir when looking for composer.json
nicolas-grekas Aug 12, 2017
423656f
Fixed some param/return annotations in PHPDOC blocks.
derrabus Aug 13, 2017
9b7750a
Made some SecurityBundle tests case-insensitive to prepare for future…
javiereguiluz Aug 10, 2017
1a5acc9
minor #23852 Made some SecurityBundle tests case-insensitive to prepa…
Aug 14, 2017
ef038ac
minor #23881 [DependencyInjection] Fixed some param/return annotation…
nicolas-grekas Aug 14, 2017
501c1b5
Merge branch '3.4'
nicolas-grekas Aug 15, 2017
8cbf094
[Console] Remove useless http-kernel dev dep
Aug 15, 2017
712e877
minor #23894 [Console] Remove useless http-kernel dev dep (chalasr)
nicolas-grekas Aug 15, 2017
d32c706
Merge branch '2.8' into 3.3
nicolas-grekas Aug 15, 2017
aef502b
Merge branch '3.3' into 3.4
nicolas-grekas Aug 15, 2017
1a5fd79
Allow phpdocumentor/reflection-docblock 4.
derrabus Aug 15, 2017
50b3d30
Merge branch '3.4'
nicolas-grekas Aug 15, 2017
2e4e6ad
[HttpKernel] Remove old container files
nicolas-grekas Aug 12, 2017
adff65a
[DI] Fix reading env vars from fastcgi params
nicolas-grekas Aug 16, 2017
af0b24e
bug #23897 Allow phpdocumentor/reflection-docblock 4 (derrabus)
nicolas-grekas Aug 16, 2017
be7751a
bug #23878 [VarDumper] play nice with open_basedir when looking for c…
nicolas-grekas Aug 16, 2017
ff62871
bug #23873 [HttpKernel] Remove old container files (nicolas-grekas)
nicolas-grekas Aug 16, 2017
befad63
feature #23815 [FrameworkBundle][SecurityBundle][TwigBundle][Yaml] re…
nicolas-grekas Aug 16, 2017
046f8c1
[VarDumper] Fix interval caster with PT3600S-like spec
maidmaid Aug 4, 2017
9026aed
bug #23793 [VarDumper] Fix interval caster with PT3600S-like spec (ma…
nicolas-grekas Aug 16, 2017
06bbee8
[Routing] Use "controller" keyword for configuring routes controllers
voronkovich Jun 18, 2017
8c4a1e7
feature #23227 Add support for "controller" keyword for configuring r…
nicolas-grekas Aug 16, 2017
a014222
bug #23899 [DI] Fix reading env vars from fastcgi params (nicolas-gre…
nicolas-grekas Aug 17, 2017
773f166
[VarDumper] Fix tests with phpredis 3.1.3
nicolas-grekas Aug 17, 2017
3f81dd1
minor #23917 [VarDumper] Fix tests with phpredis 3.1.3 (nicolas-grekas)
nicolas-grekas Aug 17, 2017
16d34eb
Merge branch '3.3' into 3.4
nicolas-grekas Aug 17, 2017
8a58d96
Merge branch '3.4'
nicolas-grekas Aug 17, 2017
c5acaee
Test for EntityType field with multiple=true
stoccc Aug 18, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[TwigBundle] Commands as a service
  • Loading branch information
ro0NL authored and fabpot committed Jul 22, 2017
commit 98391402d1c84857231ec0eccc79f4afab036b44
15 changes: 15 additions & 0 deletions UPGRADE-3.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,21 @@ TwigBridge
* deprecated the `Symfony\Bridge\Twig\Form\TwigRenderer` class, use the `FormRenderer`
class from the Form component instead

* deprecated `Symfony\Bridge\Twig\Command\DebugCommand::set/getTwigEnvironment` and the ability
to pass a command name as first argument

* deprecated `Symfony\Bridge\Twig\Command\LintCommand::set/getTwigEnvironment` and the ability
to pass a command name as first argument

TwigBundle
----------

* deprecated the `Symfony\Bundle\TwigBundle\Command\DebugCommand` class, use the `DebugCommand`
class from the Twig bridge instead

* deprecated relying on the `ContainerAwareInterface` implementation for
`Symfony\Bundle\TwigBundle\Command\LintCommand`

Validator
---------

Expand Down
10 changes: 10 additions & 0 deletions UPGRADE-4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,10 @@ TwigBundle
* The `ContainerAwareRuntimeLoader` class has been removed. Use the
Twig `Twig_ContainerRuntimeLoader` class instead.

* Removed `DebugCommand` in favor of `Symfony\Bridge\Twig\Command\DebugCommand`.

* Removed `ContainerAwareInterface` implementation in `Symfony\Bundle\TwigBundle\Command\LintCommand`.

TwigBridge
----------

Expand Down Expand Up @@ -550,6 +554,12 @@ TwigBridge

* The `TwigRendererEngine::setEnvironment()` method has been removed.
Pass the Twig Environment as second argument of the constructor instead.

* Removed `Symfony\Bridge\Twig\Command\DebugCommand::set/getTwigEnvironment` and the ability
to pass a command name as first argument.

* Removed `Symfony\Bridge\Twig\Command\LintCommand::set/getTwigEnvironment` and the ability
to pass a command name as first argument.

Validator
---------
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bridge/Twig/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ CHANGELOG
-----

* deprecated `Symfony\Bridge\Twig\Form\TwigRenderer`
* deprecated `Symfony\Bridge\Twig\Command\DebugCommand::set/getTwigEnvironment` and the ability to pass a command name as first argument
* deprecated `Symfony\Bridge\Twig\Command\LintCommand::set/getTwigEnvironment` and the ability to pass a command name as first argument

3.3.0
-----
Expand Down
37 changes: 30 additions & 7 deletions src/Symfony/Bridge/Twig/Command/DebugCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,27 @@ class DebugCommand extends Command
private $twig;

/**
* {@inheritdoc}
* @param Environment $twig
*/
public function __construct($name = 'debug:twig')
public function __construct($twig = null)
{
parent::__construct($name);
parent::__construct();

if (!$twig instanceof Environment) {
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);

$this->setName(null === $twig ? 'debug:twig' : $twig);

return;
}

$this->twig = $twig;
}

public function setTwigEnvironment(Environment $twig)
{
@trigger_error(sprintf('Method "%s" is deprecated since version 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);

$this->twig = $twig;
}

Expand All @@ -46,12 +58,15 @@ public function setTwigEnvironment(Environment $twig)
*/
protected function getTwigEnvironment()
{
@trigger_error(sprintf('Method "%s" is deprecated since version 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);

return $this->twig;
}

protected function configure()
{
$this
->setName('debug:twig')
->setDefinition(array(
new InputArgument('filter', InputArgument::OPTIONAL, 'Show details for all entries matching this filter'),
new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (text or json)', 'text'),
Expand Down Expand Up @@ -80,9 +95,17 @@ protected function configure()
protected function execute(InputInterface $input, OutputInterface $output)
{
$io = new SymfonyStyle($input, $output);
$twig = $this->getTwigEnvironment();

if (null === $twig) {
// BC to be removed in 4.0
if (__CLASS__ !== get_class($this)) {
$r = new \ReflectionMethod($this, 'getTwigEnvironment');
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
@trigger_error(sprintf('Usage of method "%s" is deprecated since version 3.4 and will no longer be supported in 4.0.', get_class($this).'::getTwigEnvironment'), E_USER_DEPRECATED);

$this->twig = $this->getTwigEnvironment();
}
}
if (null === $this->twig) {
throw new \RuntimeException('The Twig environment needs to be set.');
}

Expand All @@ -91,7 +114,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
if ($input->getOption('format') === 'json') {
$data = array();
foreach ($types as $type) {
foreach ($twig->{'get'.ucfirst($type)}() as $name => $entity) {
foreach ($this->twig->{'get'.ucfirst($type)}() as $name => $entity) {
$data[$type][$name] = $this->getMetadata($type, $entity);
}
}
Expand All @@ -105,7 +128,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

foreach ($types as $index => $type) {
$items = array();
foreach ($twig->{'get'.ucfirst($type)}() as $name => $entity) {
foreach ($this->twig->{'get'.ucfirst($type)}() as $name => $entity) {
if (!$filter || false !== strpos($name, $filter)) {
$items[$name] = $name.$this->getPrettyMetadata($type, $entity);
}
Expand Down
54 changes: 39 additions & 15 deletions src/Symfony/Bridge/Twig/Command/LintCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,27 @@ class LintCommand extends Command
private $twig;

/**
* {@inheritdoc}
* @param Environment $twig
*/
public function __construct($name = 'lint:twig')
public function __construct($twig = null)
{
parent::__construct($name);
parent::__construct();

if (!$twig instanceof Environment) {
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);

$this->setName(null === $twig ? 'lint:twig' : $twig);

return;
}

$this->twig = $twig;
}

public function setTwigEnvironment(Environment $twig)
{
@trigger_error(sprintf('Method "%s" is deprecated since version 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);

$this->twig = $twig;
}

Expand All @@ -51,12 +63,15 @@ public function setTwigEnvironment(Environment $twig)
*/
protected function getTwigEnvironment()
{
@trigger_error(sprintf('Method "%s" is deprecated since version 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);

return $this->twig;
}

protected function configure()
{
$this
->setName('lint:twig')
->setDescription('Lints a template and outputs encountered errors')
->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt')
->addArgument('filename', InputArgument::IS_ARRAY)
Expand Down Expand Up @@ -86,7 +101,16 @@ protected function execute(InputInterface $input, OutputInterface $output)
{
$io = new SymfonyStyle($input, $output);

if (null === $twig = $this->getTwigEnvironment()) {
// BC to be removed in 4.0
if (__CLASS__ !== get_class($this)) {
$r = new \ReflectionMethod($this, 'getTwigEnvironment');
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
@trigger_error(sprintf('Usage of method "%s" is deprecated since version 3.4 and will no longer be supported in 4.0.', get_class($this).'::getTwigEnvironment'), E_USER_DEPRECATED);

$this->twig = $this->getTwigEnvironment();
}
}
if (null === $this->twig) {
throw new \RuntimeException('The Twig environment needs to be set.');
}

Expand All @@ -102,20 +126,20 @@ protected function execute(InputInterface $input, OutputInterface $output)
$template .= fread(STDIN, 1024);
}

return $this->display($input, $output, $io, array($this->validate($twig, $template, uniqid('sf_', true))));
return $this->display($input, $output, $io, array($this->validate($template, uniqid('sf_', true))));
}

$filesInfo = $this->getFilesInfo($twig, $filenames);
$filesInfo = $this->getFilesInfo($filenames);

return $this->display($input, $output, $io, $filesInfo);
}

private function getFilesInfo(Environment $twig, array $filenames)
private function getFilesInfo(array $filenames)
{
$filesInfo = array();
foreach ($filenames as $filename) {
foreach ($this->findFiles($filename) as $file) {
$filesInfo[] = $this->validate($twig, file_get_contents($file), $file);
$filesInfo[] = $this->validate(file_get_contents($file), $file);
}
}

Expand All @@ -133,17 +157,17 @@ protected function findFiles($filename)
throw new \RuntimeException(sprintf('File or directory "%s" is not readable', $filename));
}

private function validate(Environment $twig, $template, $file)
private function validate($template, $file)
{
$realLoader = $twig->getLoader();
$realLoader = $this->twig->getLoader();
try {
$temporaryLoader = new ArrayLoader(array((string) $file => $template));
$twig->setLoader($temporaryLoader);
$nodeTree = $twig->parse($twig->tokenize(new Source($template, (string) $file)));
$twig->compile($nodeTree);
$twig->setLoader($realLoader);
$this->twig->setLoader($temporaryLoader);
$nodeTree = $this->twig->parse($this->twig->tokenize(new Source($template, (string) $file)));
$this->twig->compile($nodeTree);
$this->twig->setLoader($realLoader);
} catch (Error $e) {
$twig->setLoader($realLoader);
$this->twig->setLoader($realLoader);

return array('template' => $template, 'file' => $file, 'line' => $e->getTemplateLine(), 'valid' => false, 'exception' => $e);
}
Expand Down
23 changes: 19 additions & 4 deletions src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,30 @@ public function testLintFileCompileTimeException()
$this->assertRegExp('/ERROR in \S+ \(line /', trim($tester->getDisplay()));
}

/**
* @group legacy
* @expectedDeprecation Passing a command name as the first argument of "Symfony\Bridge\Twig\Command\LintCommand::__construct" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.
* @expectedException \RuntimeException
* @expectedExceptionMessage The Twig environment needs to be set.
*/
public function testLegacyLintCommand()
{
$command = new LintCommand();

$application = new Application();
$application->add($command);
$command = $application->find('lint:twig');

$tester = new CommandTester($command);
$tester->execute(array());
}

/**
* @return CommandTester
*/
private function createCommandTester()
{
$twig = new Environment(new FilesystemLoader());

$command = new LintCommand();
$command->setTwigEnvironment($twig);
$command = new LintCommand(new Environment(new FilesystemLoader()));

$application = new Application();
$application->add($command);
Expand Down
6 changes: 6 additions & 0 deletions src/Symfony/Bundle/TwigBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
CHANGELOG
=========

3.4.0
-----

* deprecated `Symfony\Bundle\TwigBundle\Command\DebugCommand`, use `Symfony\Bridge\Twig\Command\DebugCommand` instead
* deprecated relying on the `ContainerAwareInterface` implementation for `Symfony\Bundle\TwigBundle\Command\LintCommand`

3.3.0
-----

Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Bundle/TwigBundle/Command/DebugCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

namespace Symfony\Bundle\TwigBundle\Command;

@trigger_error(sprintf('The %s class is deprecated since version 3.4 and will be removed in 4.0. Use Symfony\Bridge\Twig\Command\DebugCommand instead.', DebugCommand::class), E_USER_DEPRECATED);

use Symfony\Bridge\Twig\Command\DebugCommand as BaseDebugCommand;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
Expand All @@ -19,6 +21,8 @@
* Lists twig functions, filters, globals and tests present in the current project.
*
* @author Jordi Boggiano <j.boggiano@seld.be>
*
* @deprecated since version 3.4, to be removed in 4.0.
*/
final class DebugCommand extends BaseDebugCommand implements ContainerAwareInterface
{
Expand Down
9 changes: 1 addition & 8 deletions src/Symfony/Bundle/TwigBundle/Command/LintCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,9 @@
*/
final class LintCommand extends BaseLintCommand implements ContainerAwareInterface
{
// BC to be removed in 4.0
use ContainerAwareTrait;

/**
* {@inheritdoc}
*/
protected function getTwigEnvironment()
{
return $this->container->get('twig');
}

/**
* {@inheritdoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

use Symfony\Bridge\Twig\Extension\WebLinkExtension;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Console\Application;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
Expand Down Expand Up @@ -49,6 +50,10 @@ public function load(array $configs, ContainerBuilder $container)
$loader->load('templating.xml');
}

if (class_exists(Application::class)) {
$loader->load('console.xml');
}

if (!interface_exists('Symfony\Component\Translation\TranslatorInterface')) {
$container->removeDefinition('twig.translation.extractor');
}
Expand Down
25 changes: 25 additions & 0 deletions src/Symfony/Bundle/TwigBundle/Resources/config/console.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<services>
<defaults public="false" />

<service id="twig.command.debug" class="Symfony\Bridge\Twig\Command\DebugCommand">
<argument type="service" id="twig" />
<tag name="console.command" command="debug:twig" />
</service>

<service id="twig.command.lint" class="Symfony\Bundle\TwigBundle\Command\LintCommand">
<argument type="service" id="twig" />
<tag name="console.command" command="lint:twig" />
</service>

<!-- BC to be removed in 4.0 -->
<service id="console.command.symfony_bundle_twigbundle_command_debugcommand" class="Symfony\Bundle\TwigBundle\Command\DebugCommand" public="true">
<deprecated>The "%service_id%" service is deprecated since Symfony 3.4 and will be removed in 4.0. Use "twig.command.debug" instead.</deprecated>
</service>
</services>
</container>