Skip to content

Commit

Permalink
Update for PHP 8.2+, Symfony 7 and Doctrine ORM 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
BusterNeece committed Mar 20, 2024
1 parent 4cfa9d0 commit 81219dc
Show file tree
Hide file tree
Showing 8 changed files with 280 additions and 198 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs :

strategy :
matrix :
php-version : [ '8.0', '8.1' ]
php-version : [ '8.2', '8.3' ]
steps :
- uses : actions/checkout@v1

Expand Down
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM mlocati/php-extension-installer AS php-extension-installer

FROM php:8.2-cli-alpine3.19 AS base

ENV TZ=UTC

COPY --from=php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/

RUN install-php-extensions @composer gd curl xml zip mbstring

RUN apk add --update --no-cache \
zip git curl bash \
su-exec

# Set up App user
RUN mkdir -p /var/app/www \
&& addgroup -g 1000 app \
&& adduser -u 1000 -G app -h /var/app/ -s /bin/sh -D app \
&& addgroup app www-data \
&& mkdir -p /var/app/www /var/app/www_tmp \
&& chown -R app:app /var/app

WORKDIR /var/app/www
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
SHELL=/bin/bash
.PHONY: *

list:
@LC_ALL=C $(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'

up:
docker-compose up -d

down:
docker-compose down

restart: down up

build: # Rebuild all containers and restart
docker-compose build
$(MAKE) restart

bash:
docker-compose run --rm --user=app cli bash

bash-root:
docker-compose run --rm cli bash
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "azuracast/doctrine-entity-normalizer",
"description": "An implementation of the Symfony Serializer with custom support for Doctrine 2 ORM entities.",
"description": "An implementation of the Symfony Serializer with custom support for Doctrine 3 ORM entities.",
"type": "library",
"license": "Apache-2.0",
"authors": [
{
"name": "Buster 'Silver Eagle' Neece",
"name": "Buster Neece",
"email": "[email protected]",
"homepage": "https://dashdev.net/"
"homepage": "https://busterneece.com/"
}
],
"scripts": {
Expand All @@ -25,12 +25,12 @@
}
},
"require": {
"php": ">=8.0",
"php": ">=8.2",
"doctrine/collections": ">1",
"doctrine/inflector": "^2",
"doctrine/orm": "^2",
"doctrine/orm": "^3",
"doctrine/persistence": "^2|^3",
"symfony/serializer": "^5|^6"
"symfony/serializer": "^7"
},
"require-dev": {
"php-parallel-lint/php-console-highlighter": "^1",
Expand Down
10 changes: 4 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
services:
cli:
image: ghcr.io/azuracast/testing:8.1.0
image: ghcr.io/azuracast/testing:latest
build:
context: .
volumes:
- ./:/app
- composer_data:/tmp
- ./:/var/app/www
command: composer test

volumes:
composer_data: {}
2 changes: 1 addition & 1 deletion src/Attributes/DeepNormalize.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Attribute;

#[Attribute(Attribute::TARGET_PROPERTY | Attribute::TARGET_METHOD)]
class DeepNormalize
final class DeepNormalize
{
private bool $deepNormalize;

Expand Down
Loading

0 comments on commit 81219dc

Please sign in to comment.