Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.1 release for 2.0 compatibility #31

Merged
merged 19 commits into from Jul 1, 2015
Merged

1.1 release for 2.0 compatibility #31

merged 19 commits into from Jul 1, 2015

Conversation

jsor
Copy link
Member

@jsor jsor commented Jun 12, 2015

This could become a 1.1 release which makes the API more compatible with 2.0 while preserving full backward compatibility. With this release, consuming packages can require both 1.0 (with PHP 5.3 support) and 2.0.

Changes:

  • Added Promise class
  • Moved methods of React\Promise\When and React\Promise\Util to functions while keeping the classes as a proxy for BC

Optional todos:

  • Add ExtendedPromiseInterface
  • Add CancellableInterface

namespace React\Promise;

if (function_exists('React\Promise\resolve')) {
return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC PHP only supports conditional definitions if they are actually wrapped in conditionals? In other words, has this very statement been tested? :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, fixed 😁

@clue
Copy link
Member

clue commented Jun 30, 2015

Awesome, I'd love to get this in! 👍 This certainly helps migrating from legacy PHP versions and the v1 Promise API.

Optional todos […]

Personally, I'd vote to postpone this for now, so we can get this out quicker. Should we actually need these in the future, we can still push them with an eventual v1.2 release.

Other than my above remark, this LGTM 👍

@jsor
Copy link
Member Author

jsor commented Jul 1, 2015

👍 on postponing the optional todos

@jsor jsor changed the title [WIP] 1.1 release for 2.0 compatibility 1.1 release for 2.0 compatibility Jul 1, 2015
@WyriHaximus
Copy link
Member

+1

@clue
Copy link
Member

clue commented Jul 1, 2015

👍

Let's get this in! :)

jsor added a commit that referenced this pull request Jul 1, 2015
1.1 release for 2.0 compatibility
@jsor jsor merged commit 444aa92 into 1.0 Jul 1, 2015
@jsor jsor deleted the 1.1-compat branch July 1, 2015 14:40
@joshdifabio
Copy link
Contributor

This is hugely helpful, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants