Conversation
|
The CI looks unhappy because of redeclaration, probaly caused by files pending for clean up? I think we may split this huge PR into several small PR (one for generating scripts, and one for each PHP version), which makes the PR easy to read & review. |
174426b to
3375fb4
Compare
|
I am unsure why the generator script is giving different outputs on my laptop and in CI testing D: |
|
Jesus 😅 just seen the lines added and was a bit afraid |
|
I will check rector stuff tomorrow |
Update - I've split the "removal of manually-managed deprecated functions" into a separate commit (Which can be reviewed in isolation as #536), which is removing an important feature, but isn't technically breaking it (and the following commit adds automatically-managed deprecated functions, so once both commits land, we will be good) |
4932d32 to
73f30c3
Compare
af8dd73 to
03b3045
Compare
tl;dr:
replace
```php
$function_list = read_docs();
generate_files($function_list, "../generated/");
```
with
```php
foreach(["8.1", "8.2", "8.3", "8.4"] as $version) {
exec("cd docs && git checkout $version");
$function_list = read_docs();
generate_files($function_list, "../generated/$version/");
}
```
generate a bunch of stubs like generated/misc.php:
```php
<?php
if(PHP_VERSION == "8.1") require_once __DIR__ . "/8.1/misc.php";
if(PHP_VERSION == "8.2") require_once __DIR__ . "/8.2/misc.php";
if(PHP_VERSION == "8.3") require_once __DIR__ . "/8.3/misc.php";
if(PHP_VERSION == "8.4") require_once __DIR__ . "/8.4/misc.php";
```
This also automates generation of "deprecated" `safe` functions (ie, instead of hard-coding `deprecated/apache.php`, any functions which needed safe wrappers in 8.1 but no longer need safe wrappers in 8.2 will have no-op stubs generated instead)
Currently the `Exceptions` are shared between all versions, which I _think_ is a good idea? (Thoughts, anybody?)
-
|
Given the lack of any positive or negative feedback, I'm going to YOLO this into the master branch and try to get an alpha release out sooner rather than later - if suddenly people start complaining, we can fix forwards |
tl;dr:
replace
with
generate a bunch of stubs like generated/misc.php:
This also automates generation of "deprecated"
safefunctions (ie, instead of hard-codingdeprecated/apache.php, any functions which needed safe wrappers in 8.1 but no longer need safe wrappers in 8.2 will have no-op stubs generated instead)Currently the
Exceptionsare shared between all versions, which I think is a good idea? (Thoughts, anybody?)