Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move tcpdi_parser to package #71

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/behat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Behat

on:
pull_request:
push:
branches: [ master ]

jobs:
phpunit:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.3', '7.4', '8.0', '8.1']
name: php${{ matrix.php-versions }}

steps:
- uses: actions/checkout@v2

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: ${{ matrix.coverage }}

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-

- name: Set up PHP dependencies
run: composer i

- name: Behat
run: vendor/bin/behat
42 changes: 42 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: PHPUnit

on:
pull_request:
push:
branches: [ master ]

jobs:
phpunit:
runs-on: ubuntu-latest
strategy:
matrix:
coverage: ['xdebug']
xdebug_mode: ['debug']
php-versions: ['7.3', '7.4', '8.0', '8.1']
name: php${{ matrix.php-versions }}

steps:
- uses: actions/checkout@v2

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: ${{ matrix.coverage }}

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: PHPUnit
env:
XDEBUG_MODE: ${{ matrix.xdebug_mode }}
run: ./vendor/phpunit/phpunit/phpunit -c phpunit.xml
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

9 changes: 6 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@
"require": {
"php": "^7.1||^8.0",
"tecnickcom/tcpdf": "^6.2.22",
"setasign/fpdi": "^2"
"setasign/fpdi": "^2",
"libresign/tcpdi_parser": "^0.4.0"
},
"conflict": {
"setasign/fpdf": "*",
"rafikhaceb/tcpdi": "*"
},
"require-dev": {
"phpunit/phpunit": "^7|^8",
"smalot/pdfparser": "~0.13"
"phpunit/phpunit": "^9.5",
"smalot/pdfparser": "~0.13",
"phpspec/prophecy-phpunit": "^2.0",
"behat/behat": "^3.10"
}
}
21 changes: 11 additions & 10 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<phpunit bootstrap="./vendor/autoload.php">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
bootstrap="vendor/autoload.php"
executionOrder="depends,defects"
beStrictAboutCoversAnnotation="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
failOnRisky="true"
failOnWarning="true"
verbose="true">
<testsuites>
<testsuite name="default">
<directory>./tests</directory>
</testsuite>
<testsuite name="readme">
<file>./tests/ReadmeIntegration.php</file>
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
</phpunit>
6 changes: 3 additions & 3 deletions tcpdi/tcpdi.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php

use LibreSign\TcpdiParser\tcpdi_parser;

//
// TCPDI - Version 1.1
// Based on FPDI - Version 1.4.4
Expand All @@ -23,9 +26,6 @@ class FPDF extends TCPDF {}

require_once('fpdf_tpl.php');

require_once('tcpdi_parser.php');


class TCPDI extends FPDF_TPL {
/**
* Actual filename
Expand Down
Loading