Skip to content
forked from psliwa/PHPPdf

Commit

Permalink
Merge pull request #5 from jobcloud/feat/FIAP-59/php-8.1-upgrade
Browse files Browse the repository at this point in the history
feat(FIAP-56): php 8.1 upgrade
  • Loading branch information
haeber authored May 24, 2023
2 parents 693c589 + 2925f45 commit 3182975
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 16 deletions.
30 changes: 14 additions & 16 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
{
"name": "jobcloud/psliwa-php-pdf",
"description": "Pdf and graphic files generator library for PHP.",
"keywords": ["PDF", "PHPPdf"],
"keywords": [
"PDF",
"PHPPdf"
],
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Piotr Śliwa",
"name": "Piotr Śliwa",
"homepage": "http://ohey.pl",
"email": "peter.pl7@gmail.com"
"email": "peter.pl7@gmail.com"
}
],
"require": {
"zendframework/zendpdf": "~2.0.0",
"laminas/laminas-cache": "^2.11.3"
"zendframework/zendpdf": "~2.0.0"
},
"require-dev": {
"laminas/laminas-barcode": "~2.8.0",
"laminas/laminas-validator": "~2.10.0",
"imagine/Imagine": ">=0.2.0,<0.6.0",
"phpunit/phpunit": ">=4,<5.4.0"
},
"provide": {
"laminas/laminas-cache-storage-implementation": "1.0"
"imagine/imagine": ">=0.2.0,<0.6.0",
"phpunit/phpunit": "^9.6.7"
},
"suggest": {
"laminas/laminas-barcode": "If you want to use barcodes",
"laminas/laminas-validator": "If you want to use barcodes (required by zend-barcode)",
"imagine/imagine": "If you want to use image generating (required version: >=v0.2.6)"
"imagine/imagine": "If you want to use image generating (required version: >=v0.2.6)"
},
"autoload": {
"psr-0": { "PHPPdf": "lib/", "Imagine": "lib/" }
"psr-0": {
"PHPPdf": "lib/",
"Imagine": "lib/"
}
}
}
47 changes: 47 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM php:8.1-fpm

# Set Environment Variables
ENV DEBIAN_FRONTEND noninteractive

#
#--------------------------------------------------------------------------
# Software's Installation
#--------------------------------------------------------------------------
#
# Installing tools and PHP extentions using "apt", "docker-php", "pecl",
#

# Install "curl", "libmemcached-dev", "libpq-dev", "libjpeg-dev",
# "libpng-dev", "libfreetype6-dev", "libssl-dev", "libmcrypt-dev",
RUN set -eux; \
apt-get update; \
apt-get upgrade -y; \
apt-get install -y --no-install-recommends \
git \
curl \
libmemcached-dev \
libz-dev \
libpq-dev \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
libssl-dev \
libwebp-dev \
libxpm-dev \
libmcrypt-dev \
libonig-dev; \
rm -rf /var/lib/apt/lists/*

RUN set -eux; \
# Install the PHP gd library
docker-php-ext-configure gd \
--prefix=/usr \
--with-jpeg \
--with-webp \
--with-xpm \
--with-freetype; \
docker-php-ext-install gd; \
php -r 'var_dump(gd_info());'

# install composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
12 changes: 12 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3.9'

services:
php:
container_name: php-pdf
build:
dockerfile: ./Dockerfile
context: ./
ports:
- '8080:80'
volumes:
- ../:/var/www/html

0 comments on commit 3182975

Please sign in to comment.