As of PHP 8.2.0, ext/zip is no longer statically available, but since
it is needed by the PHP SDK (e.g. too unpack the fetched dependencies),
we include the DLL, and load it in php.ini.
Some are not as specific as they should be, and some may even be wrong,
but since these are only type hints (not type declarations) they won't
affect code execution, but rather provide some help to better understand
the code – for developers as well as tooling.
* Declare methods and instance variables in abstract classes
While PHP doesn't require this, it is good style, and makes the code
easier to reason about.
* Declare class variable
While `Config::getSdkNugetFeedUrl()` is not used from within the
project, and probably just was some experimental stuff, the method is
public, so we better keep it for now, but avoid reading an undeclared
class variable.
* Dodge from covariance warnings regarding Iterator for now
* Don't pass unnecessary arguments
These are retrieved from within the called functions, what *might* not
be the best idea, but it's what we have for now.
* Assert that $cb is actually a string before string conversion
In practice, it's either "copy" or "rename".
* Declare missing `Server::getPhp()`
* Remove unreachable code
* Ensure that `$crt` is defined
From looking at the code, it seems so, but let's make sure before
reading an undefined variable.
* Config::getDepsPort() returns an int
While that is changing the signature of a public method, it makes no
sense to return a string, and later to convert to int again.
* The abstract class TrainingCase is an Interfaces\TrainingCase
There shouldn't be the need for even having an interface (an abstract
class should be sufficient), but we keep the interface for now.
`Fetcher::getByUri()` returns a string (and since it is a public method
we don't want to change that for now), but we check for `false`; so we
change that.
We also use `file_exists()` instead of `Cache::isFileCached()` because
the method is actually called `Cache::fileIsCached()` but appears to be
broken due to applying `::getCacheablePath()` again. Furthermore the
other methods of `Cache` also use `file_exists()` directly. Since
`Cache::fileIsCached()` is public, we do not remove the otherwise
unused method yet.
PGO builds are not supported when cross-compiling, but our 32bit
production builds are supposed to be optimized. We fix this by doing
native builds of x86 on amd64 architectures, what is supported due to
the WOW64 subsystem, and is what we did before anyway.
Apparently, the phar based installation via get.symfony.com/symfony.phar
has finally been shut down. So for now, we deactivate this training
case.
See also issue #73.