Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ICanBoogie/DateTime
Browse files Browse the repository at this point in the history
  • Loading branch information
peter279k committed Aug 22, 2019
2 parents c5af506 + 9f985fa commit 47ab759
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 45 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The ICanBoogie/DateTime package is free software.
It is released under the terms of the following BSD License.

Copyright (c) 2013-2016 by Olivier Laviale
Copyright (c) 2013-2019 by Olivier Laviale
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
27 changes: 23 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@

PACKAGE_NAME = ICanBoogie/DateTime
PACKAGE_VERSION = v1.2
PHPUNIT_VERSION = phpunit-5.7.phar
PHPUNIT_FILENAME = build/$(PHPUNIT_VERSION)
PHPUNIT = php $(PHPUNIT_FILENAME)

# do not edit the following lines

all: $(PHPUNIT_FILENAME) vendor

usage:
@echo "test: Runs the test suite.\ndoc: Creates the documentation.\nclean: Removes the documentation, the dependencies and the Composer files."

Expand All @@ -17,12 +22,24 @@ update:
autoload: vendor
@composer dump-autoload

test: vendor
@phpunit
test-dependencies: $(PHPUNIT_FILENAME) vendor

$(PHPUNIT_FILENAME):
mkdir -p build
wget https://phar.phpunit.de/$(PHPUNIT_VERSION) -O $(PHPUNIT_FILENAME)

test: test-dependencies
@$(PHPUNIT)

test-coverage: vendor
test-coverage: test-dependencies
@mkdir -p build/coverage
@phpunit --coverage-html build/coverage
@$(PHPUNIT) --coverage-html build/coverage

test-coveralls: test-dependencies
@mkdir -p build/logs
composer require --dev php-coveralls/php-coveralls
@$(PHPUNIT) --coverage-clover build/logs/clover.xml
php vendor/bin/php-coveralls -v

doc: vendor
@mkdir -p build/docs
Expand All @@ -36,3 +53,5 @@ clean:
@rm -fR build
@rm -fR vendor
@rm -f composer.lock

.PHONY: all autoload doc clean test test-coverage test-coveralls update
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

[![Release](https://img.shields.io/packagist/v/ICanBoogie/DateTime.svg)](https://packagist.org/packages/icanboogie/datetime)
[![Build Status](https://img.shields.io/travis/ICanBoogie/DateTime.svg)](http://travis-ci.org/ICanBoogie/DateTime)
[![HHVM](https://img.shields.io/hhvm/icanboogie/datetime.svg)](http://hhvm.h4cc.de/package/icanboogie/datetime)
[![Code Coverage](https://img.shields.io/coveralls/ICanBoogie/DateTime.svg)](https://coveralls.io/r/ICanBoogie/DateTime)
[![Packagist](https://img.shields.io/packagist/dm/icanboogie/datetime.svg?maxAge=2592000)](https://packagist.org/packages/icanboogie/datetime)

Expand Down Expand Up @@ -349,11 +348,7 @@ echo $date->localize('fr')->as_medium; // 5 mai 2015 23:13:05

## Requirement

The package requires PHP 5.4 or later.

Starting with v1.1.0 the package implements the [JsonSerializable interface][]
and thus requires PHP 5.4+. If you only have access to PHP 5.3, use the branch
[1.0.x](https://github.com/ICanBoogie/DateTime/tree/1.0) instead.
The package requires PHP 5.6 or later.



Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"source": "https://github.com/ICanBoogie/DateTime"
},
"require": {
"php": ">=5.4.0"
"php": ">=5.6.0"
},
"require-dev": {
"icanboogie/common": "~1.2"
Expand Down
26 changes: 11 additions & 15 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="./tests/bootstrap.php"
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.7/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="./vendor/autoload.php"
>
<testsuites>
<testsuite name="ICanBoogie/DateTime Test Suite">
<directory>./tests</directory>
</testsuite>
</testsuites>
<testsuites>
<testsuite name="ICanBoogie/DateTime">
<directory>./tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
Expand Down
5 changes: 3 additions & 2 deletions tests/DateTimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
* file that was distributed with this source code.
*/

namespace Tests\ICanBoogie\Time;
namespace Tests\ICanBoogie;

use ICanBoogie\DateTime;
use ICanBoogie\DateTimeTest\MyDateTime;
use PHPUnit\Framework\TestCase;

class DateTimeTest extends \PHPUnit_Framework_TestCase
class DateTimeTest extends TestCase
{
public function setUp()
{
Expand Down
5 changes: 3 additions & 2 deletions tests/TimeZoneLocationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
* file that was distributed with this source code.
*/

namespace Tests\ICanBoogie\Time;
namespace Tests\ICanBoogie;

use ICanBoogie\TimeZoneLocation;
use PHPUnit\Framework\TestCase;

class TimeZoneLocationTest extends \PHPUnit_Framework_TestCase
class TimeZoneLocationTest extends TestCase
{
public function test_from()
{
Expand Down
5 changes: 3 additions & 2 deletions tests/TimeZoneTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
* file that was distributed with this source code.
*/

namespace Tests\ICanBoogie\Time;
namespace Tests\ICanBoogie;

use ICanBoogie\TimeZone;
use PHPUnit\Framework\TestCase;

class TimeZoneTest extends \PHPUnit_Framework_TestCase
class TimeZoneTest extends TestCase
{
public function test_get_location()
{
Expand Down
12 changes: 0 additions & 12 deletions tests/bootstrap.php

This file was deleted.

0 comments on commit 47ab759

Please sign in to comment.