Skip to content

Commit

Permalink
Provide compatibility with PHP 7.4 by overriding certain ZF components
Browse files Browse the repository at this point in the history
  • Loading branch information
tkrebs committed Jan 21, 2021
1 parent 4295557 commit 4172787
Show file tree
Hide file tree
Showing 393 changed files with 29,447 additions and 7 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2020 Tobias Krebs
Copyright (c) 2021 Tobias Krebs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ data/docs/

## Architecture

The system is based on the well-known LAMP stack (Linux, Apache 2+, MySQL 5+, PHP 5.6+) and the popular and powerful
The system is based on the well-known LAMP stack (Linux, Apache 2, MySQL 5+, PHP 5.6+) and the powerful
[Zend Framework 2](http://framework.zend.com/) (2.5).

It is compatible with PHP version up to and including 7.2 - bot not PHP 7.3+. We are currently working on an upgrade of the underlying Zend Framework to make it compatible with PHP 7.3+.
It is compatible with PHP version up to and including 7.4. We are currently working on an upgrade of the underlying
Zend Framework to make it compatible with PHP 8.0.

Dependencies are managed with [composer](https://getcomposer.org/).

Expand All @@ -43,7 +44,9 @@ where you can find stable and (latest) development releases.

## Version

The current version (May, 2020) is 1.6.4.
The current version is 1.7.0 from January, 2021.

Version 1.7.0 provides compatibility with PHP 7.4 by overriding and fixing some of the Zend Framework 2 components.

Version 1.6.4 introduced some features required during the COVID-19 pandemic, including limits to active concurrent bookings and minimum booking ranges. It also includes minor bug fixes and improvements.

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.4
1.7.0
9 changes: 8 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@
"homepage": "http://bs.hbsys.de/",

"require": {
"php": ">=5.4 <=7.2",
"php": ">=5.6 <=7.4",
"ext-intl": "*",
"zendframework/zendframework": "^2.5.3"
},

"autoload": {
"psr-4": {
"Zend\\I18n\\": "module/Zend/I18n/src/",
"Zend\\View\\": "module/Zend/View/src/"
}
}
}
11 changes: 10 additions & 1 deletion data/docs/update.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,16 @@ After every update you should delete all files within the
directory.

If you haven't made any changes to the core files, your configuration, customizations and data should stay intact
after the update. Otherwise, it's clearly your fault! :)
after the update.



--- Update to 1.7.0 ---

Replace the following directories:

- module/
- vendor/



Expand Down
27 changes: 27 additions & 0 deletions module/Zend/I18n/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) 2005-2018, Zend Technologies USA, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

- Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

- Neither the name of Zend Technologies USA, Inc. nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16 changes: 16 additions & 0 deletions module/Zend/I18n/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# zend-i18n

[![Build Status](https://secure.travis-ci.org/zendframework/zend-i18n.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-i18n)
[![Coverage Status](https://coveralls.io/repos/github/zendframework/zend-i18n/badge.svg?branch=master)](https://coveralls.io/github/zendframework/zend-i18n?branch=master)

`Zend\I18n` comes with a complete translation suite which supports all major
formats and includes popular features like plural translations and text domains.
The Translator component is mostly dependency free, except for the fallback to a
default locale, where it relies on the Intl PHP extension.

The translator itself is initialized without any parameters, as any configuration
to it is optional. A translator without any translations will actually do nothing
but just return the given message IDs.

- File issues at https://github.com/zendframework/zend-i18n/issues
- Documentation is at https://docs.zendframework.com/zend-i18n/
159 changes: 159 additions & 0 deletions module/Zend/I18n/src/ConfigProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
<?php
/**
* @link http://github.com/zendframework/zend-i18n for the canonical source repository
* @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\I18n;

use Zend\ServiceManager\Factory\InvokableFactory;

class ConfigProvider
{
/**
* Return general-purpose zend-i18n configuration.
*
* @return array
*/
public function __invoke()
{
return [
'dependencies' => $this->getDependencyConfig(),
'filters' => $this->getFilterConfig(),
'validators' => $this->getValidatorConfig(),
'view_helpers' => $this->getViewHelperConfig(),
];
}

/**
* Return application-level dependency configuration.
*
* @return array
*/
public function getDependencyConfig()
{
return [
'aliases' => [
'TranslatorPluginManager' => Translator\LoaderPluginManager::class,
],
'factories' => [
Translator\TranslatorInterface::class => Translator\TranslatorServiceFactory::class,
Translator\LoaderPluginManager::class => Translator\LoaderPluginManagerFactory::class,
],
];
}

/**
* Return zend-filter configuration.
*
* @return array
*/
public function getFilterConfig()
{
return [
'aliases' => [
'alnum' => Filter\Alnum::class,
'Alnum' => Filter\Alnum::class,
'alpha' => Filter\Alpha::class,
'Alpha' => Filter\Alpha::class,
'numberformat' => Filter\NumberFormat::class,
'numberFormat' => Filter\NumberFormat::class,
'NumberFormat' => Filter\NumberFormat::class,
'numberparse' => Filter\NumberParse::class,
'numberParse' => Filter\NumberParse::class,
'NumberParse' => Filter\NumberParse::class,
],
'factories' => [
Filter\Alnum::class => InvokableFactory::class,
Filter\Alpha::class => InvokableFactory::class,
Filter\NumberFormat::class => InvokableFactory::class,
Filter\NumberParse::class => InvokableFactory::class,
],
];
}

/**
* Return zend-validator configuration.
*
* @return array
*/
public function getValidatorConfig()
{
return [
'aliases' => [
'alnum' => Validator\Alnum::class,
'Alnum' => Validator\Alnum::class,
'alpha' => Validator\Alpha::class,
'Alpha' => Validator\Alpha::class,
'datetime' => Validator\DateTime::class,
'dateTime' => Validator\DateTime::class,
'DateTime' => Validator\DateTime::class,
'float' => Validator\IsFloat::class,
'Float' => Validator\IsFloat::class,
'int' => Validator\IsInt::class,
'Int' => Validator\IsInt::class,
'isfloat' => Validator\IsFloat::class,
'isFloat' => Validator\IsFloat::class,
'IsFloat' => Validator\IsFloat::class,
'isint' => Validator\IsInt::class,
'isInt' => Validator\IsInt::class,
'IsInt' => Validator\IsInt::class,
'phonenumber' => Validator\PhoneNumber::class,
'phoneNumber' => Validator\PhoneNumber::class,
'PhoneNumber' => Validator\PhoneNumber::class,
'postcode' => Validator\PostCode::class,
'postCode' => Validator\PostCode::class,
'PostCode' => Validator\PostCode::class,
],
'factories' => [
Validator\Alnum::class => InvokableFactory::class,
Validator\Alpha::class => InvokableFactory::class,
Validator\DateTime::class => InvokableFactory::class,
Validator\IsFloat::class => InvokableFactory::class,
Validator\IsInt::class => InvokableFactory::class,
Validator\PhoneNumber::class => InvokableFactory::class,
Validator\PostCode::class => InvokableFactory::class,
],
];
}

/**
* Return zend-view helper configuration.
*
* Obsoletes View\HelperConfig.
*
* @return array
*/
public function getViewHelperConfig()
{
return [
'aliases' => [
'currencyformat' => View\Helper\CurrencyFormat::class,
'currencyFormat' => View\Helper\CurrencyFormat::class,
'CurrencyFormat' => View\Helper\CurrencyFormat::class,
'dateformat' => View\Helper\DateFormat::class,
'dateFormat' => View\Helper\DateFormat::class,
'DateFormat' => View\Helper\DateFormat::class,
'numberformat' => View\Helper\NumberFormat::class,
'numberFormat' => View\Helper\NumberFormat::class,
'NumberFormat' => View\Helper\NumberFormat::class,
'plural' => View\Helper\Plural::class,
'Plural' => View\Helper\Plural::class,
'translate' => View\Helper\Translate::class,
'Translate' => View\Helper\Translate::class,
'translateplural' => View\Helper\TranslatePlural::class,
'translatePlural' => View\Helper\TranslatePlural::class,
'TranslatePlural' => View\Helper\TranslatePlural::class,
],
'factories' => [
View\Helper\CurrencyFormat::class => InvokableFactory::class,
View\Helper\DateFormat::class => InvokableFactory::class,
View\Helper\NumberFormat::class => InvokableFactory::class,
View\Helper\Plural::class => InvokableFactory::class,
View\Helper\Translate::class => InvokableFactory::class,
View\Helper\TranslatePlural::class => InvokableFactory::class,
],
];
}
}
14 changes: 14 additions & 0 deletions module/Zend/I18n/src/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\I18n\Exception;

interface ExceptionInterface
{
}
16 changes: 16 additions & 0 deletions module/Zend/I18n/src/Exception/ExtensionNotLoadedException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\I18n\Exception;

use DomainException;

class ExtensionNotLoadedException extends DomainException implements ExceptionInterface
{
}
14 changes: 14 additions & 0 deletions module/Zend/I18n/src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\I18n\Exception;

class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
{
}
14 changes: 14 additions & 0 deletions module/Zend/I18n/src/Exception/OutOfBoundsException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\I18n\Exception;

class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface
{
}
14 changes: 14 additions & 0 deletions module/Zend/I18n/src/Exception/ParseException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\I18n\Exception;

class ParseException extends RuntimeException implements ExceptionInterface
{
}
14 changes: 14 additions & 0 deletions module/Zend/I18n/src/Exception/RangeException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\I18n\Exception;

class RangeException extends \RangeException implements ExceptionInterface
{
}
14 changes: 14 additions & 0 deletions module/Zend/I18n/src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\I18n\Exception;

class RuntimeException extends \RuntimeException implements ExceptionInterface
{
}
Loading

0 comments on commit 4172787

Please sign in to comment.