feat: use only PIE (without composer-library) - #87
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR shifts the project to an extension-only distribution (intended for PIE usage) by removing the Composer/library + Rector tooling, while adding/adjusting extension implementation and PHPT coverage to support PHP 7.4 alongside PHP 8.1+.
Changes:
- Removed the Composer “library” surface area (autoloaded
library.php), Rector rules, and their associated PHPUnit/PHPStan configs and tests. - Added PHP 7.4 support shims in the extension build (legacy arginfo generation + PHP<8 compatibility helpers) and introduced a dedicated PHP 7 native-wrapper PHPT.
- Updated docs and build defaults to reflect extension-only usage.
Reviewed changes
Copilot reviewed 131 out of 131 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/Rector/Switch_/SwitchCaseToEqualRector/SwitchCaseToEqualRectorTest.php | Removed Rector test (library-only). |
| tests/Rector/Switch_/SwitchCaseToEqualRector/Fixture/dont_replace_switch.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/Switch_/SwitchCaseToEqualRector/Fixture/basic_replace_switch.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/Switch_/SwitchCaseToEqualRector/config/configured_rule.php | Removed Rector config (library-only). |
| tests/Rector/Spaceship/SpaceshipToBCMigrateRector/SpaceshipToBCMigrateRectorTest.php | Removed Rector test (library-only). |
| tests/Rector/Spaceship/SpaceshipToBCMigrateRector/Fixture/basic_replace_operator.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/Spaceship/SpaceshipToBCMigrateRector/config/configured_rule.php | Removed Rector config (library-only). |
| tests/Rector/SmallerOrEqual/SmallerOrEqualToBCMigrateRector/SmallerOrEqualToBCMigrateRectorTest.php | Removed Rector test (library-only). |
| tests/Rector/SmallerOrEqual/SmallerOrEqualToBCMigrateRector/Fixture/basic_replace_operator.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/SmallerOrEqual/SmallerOrEqualToBCMigrateRector/config/configured_rule.php | Removed Rector config (library-only). |
| tests/Rector/Smaller/SmallerToBCMigrateRector/SmallerToBCMigrateRectorTest.php | Removed Rector test (library-only). |
| tests/Rector/Smaller/SmallerToBCMigrateRector/Fixture/basic_replace_operator.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/Smaller/SmallerToBCMigrateRector/config/configured_rule.php | Removed Rector config (library-only). |
| tests/Rector/NotEqual/NotEqualToBCMigrateRector/NotEqualToBCMigrateRectorTest.php | Removed Rector test (library-only). |
| tests/Rector/NotEqual/NotEqualToBCMigrateRector/Fixture/basic_replace_operator.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/NotEqual/NotEqualToBCMigrateRector/config/configured_rule.php | Removed Rector config (library-only). |
| tests/Rector/New_/NewAPCIteratorToAPCUIteratorRector/NewAPCIteratorToAPCUIteratorRectorTest.php | Removed Rector test (library-only). |
| tests/Rector/New_/NewAPCIteratorToAPCUIteratorRector/Fixture/use_replace_funcs.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/New_/NewAPCIteratorToAPCUIteratorRector/Fixture/basic_replace_funcs.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/New_/NewAPCIteratorToAPCUIteratorRector/config/configured_rule.php | Removed Rector config (library-only). |
| tests/Rector/GreaterOrEqual/GreaterOrEqualToBCMigrateRector/GreaterOrEqualToBCMigrateRectorTest.php | Removed Rector test (library-only). |
| tests/Rector/GreaterOrEqual/GreaterOrEqualToBCMigrateRector/Fixture/basic_replace_operator.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/GreaterOrEqual/GreaterOrEqualToBCMigrateRector/config/configured_rule.php | Removed Rector config (library-only). |
| tests/Rector/Greater/GreaterToBCMigrateRector/GreaterToBCMigrateRectorTest.php | Removed Rector test (library-only). |
| tests/Rector/Greater/GreaterToBCMigrateRector/Fixture/basic_replace_operator.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/Greater/GreaterToBCMigrateRector/config/configured_rule.php | Removed Rector config (library-only). |
| tests/Rector/FuncCall/SortToBCMigrateRector/SortToBCMigrateRectorTest.php | Removed Rector test (library-only). |
| tests/Rector/FuncCall/SortToBCMigrateRector/Fixture/use_replace_funcs.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/FuncCall/SortToBCMigrateRector/Fixture/basic_replace_funcs.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/FuncCall/SortToBCMigrateRector/config/configured_rule.php | Removed Rector config (library-only). |
| tests/Rector/FuncCall/RandomToBCMigrateRector/RandomToBCMigrateRectorTest.php | Removed Rector test (library-only). |
| tests/Rector/FuncCall/RandomToBCMigrateRector/Fixture/use_replace_funcs.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/FuncCall/RandomToBCMigrateRector/Fixture/basic_replace_funcs.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/FuncCall/RandomToBCMigrateRector/config/configured_rule.php | Removed Rector config (library-only). |
| tests/Rector/FuncCall/ArrayMultisortToBCMigrateRector/Fixture/use_replace_funcs.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/FuncCall/ArrayMultisortToBCMigrateRector/Fixture/basic_replace_funcs.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/FuncCall/ArrayMultisortToBCMigrateRector/config/configured_rule.php | Removed Rector config (library-only). |
| tests/Rector/FuncCall/ArrayMultisortToBCMigrateRector/ArrayMultisortToBCMigrateRectorTest.php | Removed Rector test (library-only). |
| tests/Rector/FuncCall/ArrayKeyExistsToPropertyExistsRector/Fixture/basic_replace_funcs.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/FuncCall/ArrayKeyExistsToPropertyExistsRector/config/configured_rule.php | Removed Rector config (library-only). |
| tests/Rector/FuncCall/ArrayKeyExistsToPropertyExistsRector/ArrayKeyExistsToPropertyExistsRectorTest.php | Removed Rector test (library-only). |
| tests/Rector/FuncCall/ArrayFuncToBCMigrateRector/Fixture/use_replace_funcs.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/FuncCall/ArrayFuncToBCMigrateRector/Fixture/basic_replace_funcs.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/FuncCall/ArrayFuncToBCMigrateRector/config/configured_rule.php | Removed Rector config (library-only). |
| tests/Rector/FuncCall/ArrayFuncToBCMigrateRector/ArrayFuncToBCMigrateRectorTest.php | Removed Rector test (library-only). |
| tests/Rector/FuncCall/APCToAPCUFunctionMigrateRector/Fixture/use_replace_funcs.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/FuncCall/APCToAPCUFunctionMigrateRector/Fixture/use_dont_replace_funcs.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/FuncCall/APCToAPCUFunctionMigrateRector/Fixture/dont_replace_funcs.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/FuncCall/APCToAPCUFunctionMigrateRector/Fixture/basic_replace_funcs.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/FuncCall/APCToAPCUFunctionMigrateRector/config/configured_rule.php | Removed Rector config (library-only). |
| tests/Rector/FuncCall/APCToAPCUFunctionMigrateRector/APCToAPCUFunctionMigrateRectorTest.php | Removed Rector test (library-only). |
| tests/Rector/Equal/EqualToBCMigrateRector/Fixture/basic_replace_operator.php.inc | Removed Rector fixture (library-only). |
| tests/Rector/Equal/EqualToBCMigrateRector/EqualToBCMigrateRectorTest.php | Removed Rector test (library-only). |
| tests/Rector/Equal/EqualToBCMigrateRector/config/configured_rule.php | Removed Rector config (library-only). |
| tests/Rector/AbstractSimpleRectorTestCase.php | Removed Rector test base class (library-only). |
| tests/Extension/PHP74Test.php | Removed PHPUnit extension tests (library-only). |
| tests/Extension/PHP70Test.php | Removed PHPUnit extension tests (library-only). |
| tests/AbstractTestCase.php | Removed PHPUnit base class (library-only). |
| src/Rector/Switch_/SwitchCaseToEqualRector.php | Removed Rector rule (library-only). |
| src/Rector/Spaceship/SpaceshipToBCMigrateRector.php | Removed Rector rule (library-only). |
| src/Rector/SmallerOrEqual/SmallerOrEqualToBCMigrateRector.php | Removed Rector rule (library-only). |
| src/Rector/Smaller/SmallerToBCMigrateRector.php | Removed Rector rule (library-only). |
| src/Rector/NotEqual/NotEqualToBCMigrateRector.php | Removed Rector rule (library-only). |
| src/Rector/New_/NewAPCIteratorToAPCUIteratorRector.php | Removed Rector rule (library-only). |
| src/Rector/GreaterOrEqual/GreaterOrEqualToBCMigrateRector.php | Removed Rector rule (library-only). |
| src/Rector/Greater/GreaterToBCMigrateRector.php | Removed Rector rule (library-only). |
| src/Rector/FuncCall/SortToBCMigrateRector.php | Removed Rector rule (library-only). |
| src/Rector/FuncCall/RandomToBCMigrateRector.php | Removed Rector rule (library-only). |
| src/Rector/FuncCall/ArrayMultisortToBCMigrateRector.php | Removed Rector rule (library-only). |
| src/Rector/FuncCall/ArrayKeyExistsToPropertyExistsRector.php | Removed Rector rule (library-only). |
| src/Rector/FuncCall/ArrayFuncToBCMigrateRector.php | Removed Rector rule (library-only). |
| src/Rector/FuncCall/APCToAPCUFunctionMigrateRector.php | Removed Rector rule (library-only). |
| src/Rector/Equal/EqualToBCMigrateRector.php | Removed Rector rule (library-only). |
| src/Rector/BCTrait.php | Removed Rector helper trait (library-only). |
| src/Rector/AbstractBinaryOpRector.php | Removed Rector base class (library-only). |
| README.md | Updated documentation to describe extension-only usage and PHP 7.4 wrapper behavior. |
| phpunit.xml | Removed PHPUnit configuration (library-only). |
| phpstan.neon | Removed PHPStan configuration (library-only). |
| library.php | Removed Composer/autoloaded compatibility library layer. |
| library_test.sh | Removed library-oriented test script. |
| ext/tests/reflection.phpt | Added SKIPIF gating for PHP-version-specific reflection expectations. |
| ext/tests/phpinfo.phpt | Made phpinfo assertion compatible with PHP 7.4 (strpos instead of str_contains). |
| ext/tests/php74/sort_mode_change.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/object_sort_snapshot.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/object_compare_snapshot.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/object_compare_log_snapshot_log.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/object_compare_log_snapshot_deprecated.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/object_compare_error_handler.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/function/usort.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/function/usort_stable_incompatibility_no_double_callback.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/function/usort_stable_compatible_no_warning.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/function/usort_callback_side_effect.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/function/uksort.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/function/uasort.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/function/uasort_uksort_stable_incompatibility_no_double_callback.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/function/sort.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/function/sort_recursive_array_side_effect.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/function/sort_array_warning_side_effect.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/function/rsort.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/function/ksort.phpt | Updated SKIPIF gating (now also skips on PHP < 8). |
| ext/tests/php74/function/ksort_php82later.phpt | Updated SKIPIF gating (now also skips on PHP < 8). |
| ext/tests/php74/function/krsort.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/function/krsort_php82later.phpt | Updated SKIPIF gating (now also skips on PHP < 8). |
| ext/tests/php74/function/in_array.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/function/asort.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/function/arsort.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/function/array_search.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/function/array_multisort.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/function/array_keys.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/compare_mode_change.phpt | Added SKIPIF gating for PHP-version-specific diagnostics. |
| ext/tests/php74/binaryop/compare_006.phpt | Updated SKIPIF gating (now also skips on PHP < 8). |
| ext/tests/php74/binaryop/compare_006_64bit.phpt | Updated SKIPIF gating (now also skips on PHP < 8). |
| ext/tests/php74/binaryop/compare_005.phpt | Updated SKIPIF gating (now also skips on PHP < 8). |
| ext/tests/php74/binaryop/compare_005_64bit.phpt | Updated SKIPIF gating (now also skips on PHP < 8). |
| ext/tests/php74/binaryop/compare_004.phpt | Updated SKIPIF gating (now also skips on PHP < 8). |
| ext/tests/php74/binaryop/compare_004_64bit.phpt | Updated SKIPIF gating (now also skips on PHP < 8). |
| ext/tests/php74/binaryop/compare_003.phpt | Updated SKIPIF gating (now also skips on PHP < 8). |
| ext/tests/php74/binaryop/compare_003_64bit.phpt | Updated SKIPIF gating (now also skips on PHP < 8). |
| ext/tests/php74/binaryop/compare_001.phpt | Updated SKIPIF gating (now also skips on PHP < 8). |
| ext/tests/php74/binaryop/compare_001_64bit.phpt | Updated SKIPIF gating (now also skips on PHP < 8). |
| ext/tests/php74_native_wrappers.phpt | Added PHP 7.x-only PHPT to validate “thin wrapper” behavior. |
| ext/php_colopl_bc.h | Added PHP<8 compatibility helpers and guarded globals for dual-support builds. |
| ext/colopl_bc.stub.php | Enabled legacy arginfo generation for PHP 7.x builds. |
| ext/colopl_bc.c | Switched arginfo include based on PHP version; guarded init state for PHP<8. |
| ext/colopl_bc_php74.c | Added PHP<8 implementation path (native wrappers + comparisons). |
| ext/colopl_bc_legacy_arginfo.h | Added generated legacy arginfo header for PHP 7.x builds. |
| ext/colopl_bc_arginfo.h | Updated generated arginfo for modern PHP builds (raw fentries). |
| Dockerfile | Defaulted container build target to PHP 7.4 image tag. |
| composer.json | Converted package metadata to extension-only (removed library autoload + dev deps). |
| build/library/test.sh | Removed library test harness script. |
| build/library/Dockerfile | Removed library test container definition. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+298
to
+302
| REGISTER_LONG_CONSTANT("COLOPL_BC_PHP74_COMPARE_MODE_SILENT", COLOPL_BC_PHP74_COMPARE_MODE_SILENT, CONST_PERSISTENT | CONST_CS); | ||
| REGISTER_LONG_CONSTANT("COLOPL_BC_PHP74_COMPARE_MODE_DEPRECATED", COLOPL_BC_PHP74_COMPARE_MODE_DEPRECATED, CONST_PERSISTENT | CONST_CS); | ||
| REGISTER_LONG_CONSTANT("COLOPL_BC_PHP74_COMPARE_MODE_LOG", COLOPL_BC_PHP74_COMPARE_MODE_LOG, CONST_PERSISTENT | CONST_CS); | ||
| REGISTER_LONG_CONSTANT("COLOPL_BC_PHP74_SORT_MODE_SILENT", COLOPL_BC_PHP74_SORT_MODE_SILENT, CONST_PERSISTENT | CONST_CS); | ||
| REGISTER_LONG_CONSTANT("COLOPL_BC_PHP74_SORT_MODE_DEPRECATED", COLOPL_BC_PHP74_SORT_MODE_DEPRECATED, CONST_PERSISTENT | CONST_CS); |
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 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.
No description provided.