Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
…date to php 7.2 (#7)
  • Loading branch information
Rastusik committed May 17, 2018
1 parent 59e4511 commit 92980d4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 26 deletions.
6 changes: 1 addition & 5 deletions config/di.pimple.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,7 @@ function () {
};

$container[BetterSerializer\DataBind\Writer\Type\ExtractorInterface::class] = function (Container $c) {
return $c[BetterSerializer\DataBind\Writer\Type\ExtractorBuilder::class]->build();
};

$container[BetterSerializer\DataBind\Writer\Type\ExtractorBuilder::class] = function () {
return new BetterSerializer\DataBind\Writer\Type\ExtractorBuilder();
return BetterSerializer\DataBind\Writer\Type\ExtractorBuilder::build();
};

$container[BetterSerializer\DataBind\Writer\Context\ContextFactoryInterface::class] = function () {
Expand Down
4 changes: 3 additions & 1 deletion docker/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
FROM php:7.1.13-cli
FROM php:7.2.5-cli

MAINTAINER Martin Fris <rasta@lj.sk>

ENV REFRESHED_AT 2018-01-12

RUN apt-get update && apt-get install -y git-core

# Install xdebug
RUN yes | pecl install xdebug && \
echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini && \
Expand Down
11 changes: 1 addition & 10 deletions docker/php/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -522,15 +522,6 @@ report_memleaks = On
; This setting is on by default.
;report_zend_debug = 0

; Store the last error/warning message in $php_errormsg (boolean). Setting this value
; to On can assist in debugging and is appropriate for development servers. It should
; however be disabled on production servers.
; Default Value: Off
; Development Value: On
; Production Value: Off
; http://php.net/track-errors
track_errors = On

; Turn off normal error reporting and emit XML-RPC error XML
; http://php.net/xmlrpc-errors
;xmlrpc_errors = 0
Expand Down Expand Up @@ -1929,4 +1920,4 @@ ldap.max_links = -1

; Local Variables:
; tab-width: 4
; End:
; End:
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,15 @@
use BetterSerializer\DataBind\Writer\Type\Chain\SimpleMember;

/**
* Class ExtractorBuilder
* @author mfris
* @package BetterSerializer\DataBind\Writer\Type
*
*/
final class ExtractorBuilder
{

/**
* @return ExtractorInterface
*/
public function build(): ExtractorInterface
public static function build(): ExtractorInterface
{
$extractor = new Extractor();
$extractor->addChainMember(new SimpleMember());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,17 @@
use PHPUnit\Framework\TestCase;

/**
* Class ExtractorBuilderTest
* @author mfris
* @package BetterSerializer\DataBind\Writer\Type
*
*/
class ExtractorBuilderTest extends TestCase
{

/**
*
* @SuppressWarnings(PHPMD.StaticAccess)
*/
public function testBuild(): void
{
$builder = new ExtractorBuilder();
$extractor = $builder->build();
$extractor = ExtractorBuilder::build();

self::assertInstanceOf(ExtractorInterface::class, $extractor);
}
Expand Down

0 comments on commit 92980d4

Please sign in to comment.