Commit ab39270f authored by François Agneray's avatar François Agneray
Browse files

#63 => done

parent a82a5f2f
Pipeline #4666 passed with stages
in 3 minutes and 59 seconds
......@@ -10,7 +10,7 @@ variables:
SONARQUBE_URL: https://sonarqube.lam.fr
install_dependencies:
image: jakzal/phpqa:php7.4
image: jakzal/phpqa:php8.0
stage: install_dependencies
script:
- composer install --ignore-platform-reqs
......@@ -24,7 +24,7 @@ install_dependencies:
- develop
test:
image: jakzal/phpqa:php7.4
image: jakzal/phpqa:php8.0
stage: test
cache:
key: ${CI_COMMIT_REF_SLUG}
......
......@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [3.6.0]
- In progress...
### Changed
- #61: Docker images are stored on the gitlab internal registry
- #63: Update composer.json dependencies and using php version 8
## [3.5.0]
### Added
- #7: Protected routes with SSO JWT
......
FROM php:7.4-apache
FROM php:8.0.3-apache
# Install modules
RUN apt-get update \
......
......@@ -23,7 +23,7 @@ install:
@docker run --init -it --rm --user $(UID):$(GID) \
-e COMPOSER_CACHE_DIR=/dev/null \
-v $(CURDIR):/project \
-w /project jakzal/phpqa:php7.4 composer install --ignore-platform-reqs
-w /project jakzal/phpqa:php8.0 composer install --ignore-platform-reqs
rebuild:
@docker-compose up --build -d
......@@ -49,13 +49,13 @@ shell:
phpunit:
@docker run --init -it --rm --user $(UID):$(GID) \
-v $(CURDIR):/project \
-w /project jakzal/phpqa:php7.4 phpdbg -qrr ./vendor/bin/phpunit --bootstrap ./tests/bootstrap.php \
-w /project jakzal/phpqa:php8.0 phpdbg -qrr ./vendor/bin/phpunit --bootstrap ./tests/bootstrap.php \
--whitelist src --colors --coverage-html ./phpunit-coverage ./tests
phpcs:
@docker run --init -it --rm --user $(UID):$(GID) \
-v $(CURDIR):/project \
-w /project jakzal/phpqa:php7.4 phpcs --standard=PSR12 --extensions=php --colors src tests
-w /project jakzal/phpqa:php8.0 phpcs --standard=PSR12 --extensions=php --colors src tests
create-db:
@docker-compose exec php sh ./conf-dev/init-keycloak.sh
......
......@@ -18,20 +18,21 @@
}
],
"require": {
"slim/slim": "^4.0",
"nyholm/psr7": "^1.2",
"nyholm/psr7-server": "^0.3.0",
"php-di/php-di": "^6.0",
"monolog/monolog": "^2.0",
"doctrine/orm": "^2.6",
"lcobucci/jwt": "^3.3"
"slim/slim": "^4.7",
"nyholm/psr7": "^1.4",
"nyholm/psr7-server": "^1.0",
"php-di/php-di": "^6.3",
"monolog/monolog": "^2.2",
"doctrine/orm": "^2.8",
"lcobucci/jwt": "^4.1"
},
"require-dev": {
"phpunit/phpunit": "^7.2"
"phpunit/phpunit": "^9.5",
"phpspec/prophecy-phpunit": "^2.0"
},
"autoload": {
"psr-4": {
"App\\": "src"
}
"psr-4": {
"App\\": "src"
}
}
}
This diff is collapsed.
FROM php:7.4-apache
FROM php:8.0.3-apache
# Install modules
RUN apt-get update \
......
This diff is collapsed.
......@@ -12,13 +12,8 @@ max_execution_time = 30
max_input_time = 60
[xdebug]
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_port=9900
xdebug.remote_connect_back=1
#xdebug.remote_host=host.docker.internal
xdebug.remote_log=/var/log/xdebug_remote.log
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20200930/xdebug.so
xdebug.mode=develop,debug
[apc]
extension=apcu.so
\ No newline at end of file
......@@ -17,7 +17,7 @@ services:
LOGGER_NAME: "anis-metamodel"
LOGGER_PATH: "php://stderr"
LOGGER_LEVEL: "debug"
TOKEN_ENABLED: 1
TOKEN_ENABLED: 0
TOKEN_PUBLIC_KEY_FILE: /data/public_key
TOKEN_ADMIN_ROLE: anis_admin
ports:
......
......@@ -28,7 +28,7 @@ class LogErrorHandler extends ErrorHandler
*
* @var LoggerInterface
*/
private $logger;
protected $logger;
/**
* Set the concrete logger api based on psr-3 logger interface
......
......@@ -13,6 +13,7 @@ declare(strict_types=1);
namespace App\Tests\Handlers;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Slim\Interfaces\CallableResolverInterface;
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Log\LoggerInterface;
......@@ -20,6 +21,8 @@ use ReflectionClass;
final class LogErrorHandlerTest extends TestCase
{
use ProphecyTrait;
private $logErrorHandler;
protected function setUp(): void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment