Skip to content
This repository was archived by the owner on Mar 29, 2024. It is now read-only.

Upcoming release plan and breaking changes #31

Closed
pinepain opened this issue Aug 30, 2017 · 6 comments
Closed

Upcoming release plan and breaking changes #31

pinepain opened this issue Aug 30, 2017 · 6 comments
Labels

Comments

@pinepain
Copy link
Member

pinepain commented Aug 30, 2017

v0.1.9 (released Sept 1, 2017):

v0.2.0 (ETA Sept 14, 2017):

  • BC-breaking API changes;
  • drop PHP 7.0 support and require PHP >= 7.1 (issue Drop PHP 7.0 support #30);
  • constants will be renamed to match PSR-2 standard;
  • snake_case methods will be removed to match PSR-2 standard;
  • method names that overlap with PHP keywords are the subject of renaming;
  • V8\Exception class as well as it methods is the subject of further renaming;

TL;DR

Upcoming release v0.1.9 will be the last release that support PHP 7.0. Starting from v0.2.0 release PHP >= 7.1 required. All comments, requests and suggesting about this should go to #30 issue.

In the upcoming v0.1.9 release I plan to start moving extension public API closer to PHP world which means it become more PSR-2 compatible, especially method names get converted from PascalCase (UpperCamelCase) to typical camelCase (LowerCamelCase) which is not the big issue as PHP is quite lenient to identifiers case. That's not the case for constants, which are often named in camelCase in V8 - I'll rename them to UPPER_UNDERSCORE. Some snake_case methods (notably, HeapStatistics methods will be renamed to camelCase.

Note, that this list of changes is incomplete, however, I'll try to keep you updated on progress and share further ideas and decisions.

As I'm also developer and a bit in ops, I know how crucial is to have stable API you can rely on and how BC-breaks hurt business.

That's why I have an upcoming surprise for you to let you abstract from v8 internals and just get things done. Stay tuned.

In a while I'll make legacy PPA for those who prefer stability and can't follow current release plan and adapt wild changes.

@pinepain
Copy link
Member Author

/cc @k42b3 (if you still using php-v8)
/cc @AlexMasterov

@chriskapp
Copy link

@pinepain thx for the notice! Yes Iam still using php-v8 and its working great. As you may know I have wrote a small lib to handle all the php <-> v8 type juggling. I think it would be great to have some of the functionallity directly in this extension i.e.:
https://github.com/apioo/psx-v8/blob/master/src/Encoder.php or
https://github.com/apioo/psx-v8/blob/master/src/Decoder.php

So Iam looking forward to the surprise to abstract away these v8 details.

@pinepain
Copy link
Member Author

pinepain commented Sep 1, 2017

@k42b3 indeed. Here is some teaser what will available to extract v8 value to php (decode in terms of your library):

Available extractors:

  • raw
  • array
  • primitive
  • string
  • number
  • bool
  • null
  • undefined
  • regexp
  • date
  • datetime
  • object
  • function
  • instance
  • assoc
  • scalar

Concepts:

  • array, array()
  • assoc
  • string
  • primitive
  • primitive(string)
  • scalar
  • scalar(string)
  • number
  • int (integer)
  • float (decimal)
  • bool (boolean)
  • null
  • undefined
  • regexp, regexp(string) - to extract only pattern without flags
  • date -> float?
  • datetime -> will be converted to DateTime
  • function
  • raw:function -> reverse-wrapped function
  • object
  • object(string)
  • instance()
  • instance(Php\Namespaced\ClassName)
  • raw
  • raw(string)
  • raw(object) -> raw object
  • raw(function) -> raw function
  • string|number
  • array(string|number)
  • array(object(string))

The list above is incomplete and may be out of date and changed in the future at all.

@pinepain pinepain added the meta label Sep 1, 2017
@pinepain
Copy link
Member Author

As there is nothing more to add, will close this thread. Will post more on update and wrapper library release.

@pinepain
Copy link
Member Author

To freeze current PPA packages I created https://launchpad.net/~pinepain/+archive/ubuntu/php-legacy ppa. This PPA won't be updated ever and eventually may be a subject of silent removal without any previous warning. Use at your own risk.

@pinepain
Copy link
Member Author

pinepain commented Oct 2, 2017

Hi! Short status update: v0.2.0 release tagged.

In advance, I published wrapper library for php-v8 - https://github.com/pinepain/php-v8-js-sandbox/tree/wip-public-release. The work is still in progress, so feels free to suggest changes and ask questions. It was made for my side projects needs and you may find ad-hoc solutions there. If you will be lucky to do that, I would appreciate if you report that to me. Also, feels free to ask questions: the doc and tests are not the strongest part and they are also in WIP state.

If you like what I'm doing and you use it in you work, I'd love if you support me on Patreon. I have plenty ideas and improvements in mind, but doing all that over evenings and weekends is not sustainable in the long term.

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

No branches or pull requests

2 participants