Add support for a new polyfill composer package #121
llaville
started this conversation in
Show and tell
Replies: 2 comments
-
4. Debug mode
See, for example, with the In this example, you must set Command to invoke become That should print following output |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Steps to add support for a new polyfill composer package
Feature introduced with version 4.2.0 (see request report #120)
1. Create database structure
This step was not changed since previous versions 4.x; you have to invoke the
db:create
command that will print following results if successfull2. Add one polyfill composer package
This step is new, because it uses the new
db:polyfill
command. On first try you should encounter following error (raised byauto-diagnose
feature)So initialize the database contents with
db:init
command, that should produced following output.On next try to run the
db:polyfill
command, you should get its help (as any other symfony console command) if you forget arguments and option.IMPORTANT Don't forget to run the
db:init -f
command after add one or more polyfill packages to refresh the database, becausedb:polyfill
command update only the JSON files (intodata/reference/extension/**
directories)3. Use Case
Add the polyfill for PHP 8.1 features with the symfony/polyfill-php81 composer package.
Provide arguments required by
db:polyfill
command :symfony/polyfill-php81
v1.25.0
(is the latest available when this post is written)8.1
-v
or-vvv
) for more details about operationIn case of success, you should get such following ouput :
And you can checks if results applied to JSON files are correct with
git diff
commandIf your infrastructure is not correct :
composer
orphpcompatinfo
commands not availableYou should encounter error like :
What does it means ?
The
db:poylfill
command requires PHP_Compatinfo to analyse and extract constants and functions provided by the polyfill package.TIP I suggest to generate a PHAR version of PHP_CompatInfo, make it executable, and put it anywhere in your PATH (including
vendor/bin
of this project)Beta Was this translation helpful? Give feedback.
All reactions