Skip to content

Commit

Permalink
update to laminas
Browse files Browse the repository at this point in the history
  • Loading branch information
tck committed Jan 24, 2021
1 parent cbdf348 commit 1c5ebd3
Show file tree
Hide file tree
Showing 28 changed files with 6,075 additions and 321 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
data
vendor
composer.lock
phing*.phar
*.bat
*.bat
.idea
.phpunit.result.cache
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
language: php

php:
- 5.6
- 7
- 7.1
- 7.2
- 7.3
- 7.4
- 8

before_script:
- composer update --prefer-source

script:
- ./vendor/bin/phpunit
- ./vendor/bin/phpcs --standard=PSR2 --ignore="test/Bootstrap.php" ./src/ ./test/
- ./vendor/bin/phpcs --standard=PSR2 --ignore="test/Bootstrap.php" ./src/ ./tests/

after_script:
- if [ $TRAVIS_PHP_VERSION != '7' ] && [ $TRAVIS_PHP_VERSION != '7.1' ] && [ $TRAVIS_PHP_VERSION != '7.2' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ $TRAVIS_PHP_VERSION != '7' ] && [ $TRAVIS_PHP_VERSION != '7.1' ] && [ $TRAVIS_PHP_VERSION != '7.2' ]; then php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi
- if [ $TRAVIS_PHP_VERSION != '7.3' ] && [ $TRAVIS_PHP_VERSION != '7.4' ] && [ $TRAVIS_PHP_VERSION != '8' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ $TRAVIS_PHP_VERSION != '7.3' ] && [ $TRAVIS_PHP_VERSION != '7.4' ] && [ $TRAVIS_PHP_VERSION != '8' ]; then php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi

notifications:
email: false
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@
[![Total Downloads](https://poser.pugx.org/tck/zf2-imageresizer/downloads)](https://packagist.org/packages/tck/zf2-imageresizer)
[![License](https://poser.pugx.org/tck/zf2-imageresizer/license)](https://packagist.org/packages/tck/zf2-imageresizer)

This Zend Framework module, once enabled, allows image resizing and manipulation by url.
This Laminas module, once enabled, allows image resizing and manipulation by url.


### Requirements

* PHP 5.6+
* [Zend Framework 3](https://github.com/zendframework/zendframework) (> 3.0)
* [Imagine](http://imagine.readthedocs.org/en/latest/) (> 0.6)
* PHP 7.2+
* [Laminas MVC](https://docs.laminas.dev/mvc/)
* [Imagine](http://imagine.readthedocs.org/en/latest/)

> **IMPORTANT! Version notes**
> **IMPORTANT! Version notes**
> * Version **3.x**: Laminas, dropped support for Zend Framework 3.
> * Version **2.x**: Zend Framework 3, dropped support for Zend Framework 2.
> * Version **1.x**: Zend Framework 2
### Installation

Install via composer in your zf project
Install via composer in your Laminas project

$ composer require tck/zf2-imageresizer

Expand Down Expand Up @@ -59,7 +60,7 @@ Example: Create a thumbnail and grayscale image
* `processed/`img/logo`.$thumb,160,120$grayscale`.jpg

#### View helper
ZF2 tempalte:
Laminas tempalte:

```php
<img alt="Example image" src="<?php echo $this->resize('img/logo.jpg')->thumb(200, 160)->grayscale(); ?>" />
Expand Down
23 changes: 6 additions & 17 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
</condition>

<target name="build"
depends="prepare,vendor,lint,phploc-ci,pdepend,phpmd-ci,phpcs-ci,phpcpd-ci,phpunit,phpdox"
depends="prepare,vendor,lint,phploc-ci,pdepend,phpmd-ci,phpcs-ci,phpcpd-ci,phpunit"
description=""/>

<target name="build-parallel"
depends="prepare,vendor,lint,tools-parallel,phpunit,phpdox"
depends="prepare,vendor,lint,tools-parallel,phpunit"
description=""/>

<target name="tools-parallel" description="Run tools in parallel">
Expand All @@ -34,7 +34,6 @@
<delete dir="${basedir}/build/coverage"/>
<delete dir="${basedir}/build/logs"/>
<delete dir="${basedir}/build/pdepend"/>
<delete dir="${basedir}/build/phpdox"/>
<property name="clean.done" value="true"/>
</target>

Expand All @@ -46,7 +45,6 @@
<mkdir dir="${basedir}/build/coverage"/>
<mkdir dir="${basedir}/build/logs"/>
<mkdir dir="${basedir}/build/pdepend"/>
<mkdir dir="${basedir}/build/phpdox"/>
<property name="prepare.done" value="true"/>
</target>

Expand All @@ -68,7 +66,7 @@
<modified />
</fileset>

<fileset dir="${basedir}/test">
<fileset dir="${basedir}/tests">
<include name="**/*.php" />
<modified />
</fileset>
Expand All @@ -83,7 +81,7 @@
<exec executable="${toolsdir}phploc${script-suffix}" taskname="phploc">
<arg value="--count-tests" />
<arg path="${basedir}/src" />
<arg path="${basedir}/test" />
<arg path="${basedir}/tests" />
</exec>

<property name="phploc.done" value="true"/>
Expand All @@ -100,7 +98,7 @@
<arg value="--log-xml" />
<arg path="${basedir}/build/logs/phploc.xml" />
<arg path="${basedir}/src" />
<arg path="${basedir}/test" />
<arg path="${basedir}/tests" />
</exec>

<property name="phploc.done" value="true"/>
Expand Down Expand Up @@ -155,7 +153,7 @@
<arg value="--extensions=php" />
<arg value="--ignore=autoload.php" />
<arg path="${basedir}/src" />
<arg path="${basedir}/test" />
<arg path="${basedir}/tests" />
</exec>

<property name="phpcs.done" value="true"/>
Expand Down Expand Up @@ -212,13 +210,4 @@
<property name="phpunit.done" value="true"/>
</target>

<target name="phpdox"
unless="phpdox.done"
depends="phploc-ci,phpcs-ci,phpmd-ci"
description="Generate API documentation using phpDox">
<exec executable="${toolsdir}phpdox${script-suffix}" dir="${basedir}/build" taskname="phpdox"/>

<property name="phpdox.done" value="true"/>
</target>
</project>

5 changes: 2 additions & 3 deletions build/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
api
coverage
html-coverage
logs
pdepend
phpdox
pdepend
25 changes: 0 additions & 25 deletions build/phpdox.xml

This file was deleted.

54 changes: 29 additions & 25 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tck/zf2-imageresizer",
"description": "Image resizer and manipulation module for Zend Framework 3",
"description": "Image resizer and manipulation module for Laminas",
"type": "library",
"authors": [
{
Expand All @@ -13,44 +13,48 @@
"image",
"zend",
"zf2",
"zf3",
"laminas",
"mvc",
"php"
],
"homepage": "https://github.com/tck/zf2-imageresizer",
"license": [
"MIT"
],
"require": {
"php": "^5.6 || ^7.0",
"zendframework/zend-mvc": "^3.0.1",
"zendframework/zend-loader": "^2.5.1",
"zendframework/zend-modulemanager": "^2.7.2",
"zendframework/zend-config": "^2.6 || ^3.0",
"zendframework/zend-cache": "^2.7.1",
"zendframework/zend-log": "^2.9",
"zendframework/zend-view": "^2.8",
"zendframework/zend-i18n": "^2.7.3",
"zendframework/zend-console": "^2.6",
"zendframework/zend-http": "^2.5.4",
"php": "^7.2 || ^8.0",
"laminas/laminas-mvc": "^3.0.1",
"laminas/laminas-loader": "^2.5.1",
"laminas/laminas-modulemanager": "^2.7.2",
"laminas/laminas-config": "^2.6 || ^3.0",
"laminas/laminas-cache": "^2.7.1",
"laminas/laminas-log": "^2.9",
"laminas/laminas-view": "^2.8",
"laminas/laminas-i18n": "^2.7.3",
"laminas/laminas-console": "^2.6",
"laminas/laminas-http": "^2.5.4",
"imagine/imagine": "^0.6 || ^1.0"
},
"require-dev": {
"phpunit/phpunit": "~4.3|~5",
"mikey179/vfsstream": "1.*",
"squizlabs/php_codesniffer": "1.*",
"phploc/phploc": "2.*",
"squizlabs/php_codesniffer": "^3.5",
"phploc/phploc": "^7.0",
"pdepend/pdepend": "2.*",
"phpmd/phpmd": "2.*",
"sebastian/phpcpd": "2.*",
"theseer/phpdox": "0.7.*",
"nikic/php-parser": "<1.2.0",
"zendframework/zend-serializer": "~2.5"
"laminas/laminas-serializer": "~2.5",
"phpunit/phpunit": "^9.5",
"nikic/php-parser": "^4.10",
"sebastian/phpcpd": "^6.0"
},
"autoload": {
"psr-4" : {
"TckImageResizer\\": "TckImageResizer/src/"
},
"classmap": [
"./Module.php"
]
"psr-4": {
"TckImageResizer\\": "./src/"
}
},
"autoload-dev": {
"psr-4": {
"TckImageResizerTest\\": "./tests/TckImageResizerTest/"
}
}
}
Loading

0 comments on commit 1c5ebd3

Please sign in to comment.