mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-28 11:09:26 +00:00
58962a054e
* Increase PHPStan memory limit on local development
* Add emjois to test warnings and test errors
* Fix PHPStan static analysis errors
Error messages:
------ ------------------------------------------------------------------------------------------------------
Line src/Curl/Curl.php
------ ------------------------------------------------------------------------------------------------------
123 Cannot unset property Curl\Curl::$curlErrorCodeConstant because it might have hooks in a subclass.
🪪 unset.possiblyHookedProperty
124 Cannot unset property Curl\Curl::$curlErrorCodeConstants because it might have hooks in a subclass.
🪪 unset.possiblyHookedProperty
125 Cannot unset property Curl\Curl::$curlOptionCodeConstants because it might have hooks in a subclass.
🪪 unset.possiblyHookedProperty
126 Cannot unset property Curl\Curl::$effectiveUrl because it might have hooks in a subclass.
🪪 unset.possiblyHookedProperty
127 Cannot unset property Curl\Curl::$rfc2616 because it might have hooks in a subclass.
🪪 unset.possiblyHookedProperty
128 Cannot unset property Curl\Curl::$rfc6265 because it might have hooks in a subclass.
🪪 unset.possiblyHookedProperty
129 Cannot unset property Curl\Curl::$totalTime because it might have hooks in a subclass.
🪪 unset.possiblyHookedProperty
564 Cannot unset property Curl\Curl::$curlErrorCodeConstant because it might have hooks in a subclass.
🪪 unset.possiblyHookedProperty
565 Cannot unset property Curl\Curl::$effectiveUrl because it might have hooks in a subclass.
🪪 unset.possiblyHookedProperty
566 Cannot unset property Curl\Curl::$totalTime because it might have hooks in a subclass.
🪪 unset.possiblyHookedProperty
------ ------------------------------------------------------------------------------------------------------
33 lines
768 B
Bash
Executable File
33 lines
768 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
cd "${SCRIPT_DIR}"
|
|
|
|
source "set_vars.inc.sh"
|
|
|
|
# Run commands from the project root directory.
|
|
pushd ..
|
|
|
|
set -x
|
|
|
|
if [[ $(echo "${CI_PHP_VERSION} >= 7.4" | bc -l) -eq 1 ]]; then
|
|
|
|
phpstan_args=(--ansi --configuration="tests/phpstan.neon")
|
|
|
|
# Increase memory limit on local development.
|
|
if [[ "${CI}" != "true" ]]; then
|
|
phpstan_args+=(--memory-limit=256M)
|
|
fi
|
|
|
|
vendor/bin/phpstan --version
|
|
vendor/bin/phpstan analyse "${phpstan_args[@]}" .
|
|
if [[ "${?}" -ne 0 ]]; then
|
|
echo "❌ Error: phpstan static analysis check failed"
|
|
errors+=("phpstan static analysis check failed")
|
|
fi
|
|
else
|
|
echo "⚠️ Skipped running phpstan check"
|
|
fi
|
|
|
|
popd
|