@@ -29,20 +29,30 @@ _run_task() {
2929}
3030export -f _run_task
3131
32- install_property_info_for_version () {
33- local php_version=" $1 "
34- local symfony_version=" $2 "
35-
36- if [ " $symfony_version " = " 7.4.*" ]; then
37- composer require symfony/property-info:7.4.* symfony/type-info:7.4.*
38- elif [ " $symfony_version " = " 8.0.*" ]; then
39- composer require symfony/property-info:8.0.* symfony/type-info:8.0.*
40- elif [ " $php_version " = " 8.2" ]; then
32+ # Install specific versions of PropertyInfo and TypeInfo based on PHP and Symfony versions
33+ # To remove in Symfony UX 4.0
34+ live_component_post_install () {
35+ local php_version=$1
36+ local symfony_version=$2
37+
38+ if [ " $php_version " = " 8.1" ]; then
39+ # no-op, let Composer install the best PropertyInfo version (defined in composer.json), but do not require TypeInfo
40+ return 0
41+ fi
42+
43+ if [ " $php_version " = " 8.2" ]; then
44+ # PropertyInfo 7.1 (experimental PropertyTypeExtractorInterface::getType) and TypeInfo 7.2 (lowest non-experimental)
4145 composer require symfony/property-info:7.1.* symfony/type-info:7.2.*
42- elif [ " $php_version " = " 8.3" ]; then
43- composer require symfony/property-info:7.2.* symfony/type-info:7.2.*
44- elif [ " $php_version " = " 8.4" ]; then
46+ return $?
47+ fi
48+
49+ if [ " $php_version " = " 8.3" ]; then
50+ # Install PropertyInfo 7.3 (deprecate PropertyTypeExtractorInterface::getTypes) and TypeInfo 7.3 (new features and deprecations)
4551 composer require symfony/property-info:7.3.* symfony/type-info:7.3.*
52+ return $?
4653 fi
54+
55+ # Install the best TypeInfo version available
56+ composer require symfony/type-info
4757}
48- export -f install_property_info_for_version
58+ export -f live_component_post_install
0 commit comments