Git Product home page Git Product logo

php-valueobjects's People

Contributors

gws avatar rquadling avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

php-valueobjects's Issues

gwis/php-valueobjects vs gws/php-valueobjects

Packagist is using https://packagist.org/packages/gwis/php-valueobjects
Github is using https://github.com/gws/php-valueobjects

The issue comes when I want to use my fork whilst waiting for a PR merge.

My composer has { "type": "vcs", "url": "https://github.com/rquadling/php-valueobjects" }, in the repositories, but the package name doesn't exist in both places.

I either have to say I want gwis/php-valueobjects when I am using Packagist (and therefore no fork) or gws/php-valueobjects when I am using Github (and therefore ONLY my fork which I'll delete once you've merged my PR).

Ideally they should be the same name.

Can this be resolved please?

Support for DateTimeInterface

Hi.

Wanting to use DateTimeImmutable for DateRange, but the typehint is current DateTime.

Moving to DateTimeInterface would be ideal, but this is PHP5.5+ only.

Polyfilling of the DateTimeInterface and DateTimeImmutable is all possible, but the issue is that you cannot add the DateTimeInterface to DateTime so you would lose compatibility at some stage.

Maybe a branch for PHP5.5+ that uses DateTimeInterface typehint, rather than DateTime would be nice.

bcmath as a suggested extension.

For some reason, our production server wasn't built using --enable-bcmath. As a consequence we have to use --ignore-platform-reqs to get this package installed.

Is there any benefit in any of the following ideas:

  1. Split php-valueobjects into more specific types.
  2. Make any currently required extension a suggested extension and use extension sniffing to allow the class to be used (Money.php is currently the only user).

Having said that:

  1. will still fail on production if locally bcmath is available, but fails at composer install stage.
  2. will still fail on production if locally bcmath is available, but fails at runtime if the Money VO is used.

I suppose just getting the admin to install bcmath is the solution.

Unless you have any other ideas.

Testing of date/datetime range anchors requires too much logic.

Currently, to test a DateRange (or DateTimeRange) to see if it is anchored in the PAST/FUTURE or both (INFINITE), you have to create a new DateTime(DateRange::PAST) or DateTime(DateTimeRange::PAST).

#7 allows you to simply test your existing range (date or datetime).

$dr1 = new DateRange(new DateTime('2006-09-06'), new DateTime('2006-09-15'));
$dr1->isPast(); // false

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.