Skip to content

Commit

Permalink
Merge pull request #3 from 42coders/laravel9-compatibility
Browse files Browse the repository at this point in the history
Laravel9 compatibility
  • Loading branch information
daniel-werner authored Mar 9, 2022
2 parents f847018 + a4652f8 commit 3218044
Show file tree
Hide file tree
Showing 9 changed files with 2,168 additions and 652 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Tests

on: [push, pull_request]

jobs:
run-tests:

runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.4', '8.0', '8.1']
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Install poppler
run: sudo apt-get install poppler-utils
- name: Install Dependencies
run: composer update --no-interaction --prefer-source
- name: Link poppler utils
run: ln -s /usr/bin vendor/bin/poppler
- name: Execute tests (Unit and Feature tests) via PHPUnit
run: vendor/bin/phpunit
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# PopplerPhp: Comprehensive PHP wrapper for Poppler-utils

[![Build Status](https://github.com/42coders/poppler-php/actions/workflows/test.yml/badge.svg)](https://github.com/42coders/poppler-php/actions/workflows/test.yml)

PopplerPhp is a complete and very flexible PHP wrapper for [Poppler-utils](http://poppler.freedesktop.org/).
This package is brought to you so you can use php and poppler-utils to extract contents from, and convert your pdf files to any of these formats:

Expand Down Expand Up @@ -62,6 +64,21 @@ Brew is a famous package manager on OS/X : http://brew.sh/ (aptitude style).
brew install poppler
```

### Running unit tests
#### On macOS
After installing poppler, create a simbolic link the `vendor/bin/poppler` which points
to the directory containing the poppler executables for example: `/usr/local/Cellar/poppler/22.02.0/bin`

In the root of the project run:
```shell
ln -s /usr/local/Cellar/poppler/22.02.0/bin vendor/bin/poppler
```

To find the directory where the poppler executables are run the following command:
```shell
ls -al /usr/local/bin | grep pdfinfo
```

### Usage

Here are some samples.
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
}
],
"require" : {
"php" : ">=5.5.9",
"illuminate/config" : "^5.3|^6.0|^7.0|^8.0",
"illuminate/support" : "^5.3|^6.0|^7.0|^8.0"
"php" : "^7.4|^8.0",
"illuminate/config" : "^5.3|^6.0|^7.0|^8.0|^9.0",
"illuminate/support" : "^5.3|^6.0|^7.0|^8.0|^9.0"
},
"require-dev" : {
"phpunit/phpunit" : "5.5.*|^7.0|^8.0|^9.0"
Expand Down
Loading

0 comments on commit 3218044

Please sign in to comment.