Skip to content
forked from psliwa/PHPPdf

Commit

Permalink
feat(FIAP-59): get rid of laminas dependencies which are not used and…
Browse files Browse the repository at this point in the history
… blocking us form PHP 8.1 upgrade
  • Loading branch information
tomicgoran committed Apr 24, 2023
1 parent 6d154e8 commit 8f8af3e
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 14 deletions.
26 changes: 12 additions & 14 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": "^3.0.1"
"zendframework/zendpdf": "~2.0.0"
},
"require-dev": {
"laminas/laminas-barcode": "~2.11.0",
"laminas/laminas-validator": "~2.25.0",
"imagine/imagine": ">=0.2.0,<0.6.0",
"phpunit/phpunit": "^9.6.7"
},
"provide": {
"laminas/laminas-cache-storage-implementation": "1.0"
},
"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/"
}
}
}
53 changes: 53 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#
#--------------------------------------------------------------------------
# Image Setup
#--------------------------------------------------------------------------
#

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 8f8af3e

Please sign in to comment.