Comments (10)
Any spec about how this command would behave? Something like:
- when successfully installing a php version phpbrew saves information about how it was built (alias, variants, options). Let's suppose
5.5.6-phpbrew.json
- user would install a phpbrew build with something like
$ phpbrew rebuild 5.5.6-phpbrew.json
from phpbrew.
yeah sure, see if we can serialise the build information through json or php serialisation.
on the refactoring-tasks
branch, there is a PhpBrew/Build class, this should store all the build information, and you can see how the informations are set to the Build object.
After finished the building, we can simply call
$build->save();
to save informations for a build (including name, version, source directory, dist directory, variants... etc)
then maybe we could have a method to load it back:
$build = Build::loadFromFile('path/to/info_file);
or
$build = Build::loadByName('php-5.5.6');
note that we will have "name" and "version" attributes in the build object, because we can give different name with the same version and which are different builds, for example:
5.5.6-mysql
5.5.6-debug
5.5.6-foobar
are different builds but with the same version.
For now, we have the phpbrew.variants
file in each dist directory, and we also need to make the new mechanism consistent with the old one (or migrate the phpbrew.variants
to the new one)
So if we want to add a rebuild command, we can do:
phpbrew rebuild {name}
And use the loadByName
method to load the build file.
from phpbrew.
Further, we can have another command to export the build information, e.g.:
phpbrew export {name} {file}
And we can import the build from a local file or an url:
phpbrew import {file}
phpbrew import {url}
from phpbrew.
By the way, If we want to use JSON format by default, we might also need to enable +json variant by default for every new install.
from phpbrew.
Hello!
Sorry for the delay, I haven't noticed all those replies.
Good catch! Maybe turning +json variant obligatory could become too invasive? In positive case, the idea of a good and old file_put_content($filename, serialize($build)
and unserialize(file_get_content($filename))
would be enough IMMO.
from phpbrew.
yeah I think using built-in serialization is enough for now. because users usually don't modify this file, if they want, they can export to json individually, e.g.,
phpbrew export --format json {version name} 5.4.3-db.json
from phpbrew.
We'll be using yml to store build information from now on. Seems more logical now that we already included symfony yaml parser as a dependency and it does not require any extension.
from phpbrew.
That makes sense.
- Modifiable.
- Readable.
- Does not require an extension.
from phpbrew.
Is there a branch tied to this idea?
from phpbrew.
not yet, it's welcome to create one for that :)
from phpbrew.
Related Issues (20)
- installing/enabling imagick leads to segmentation fault on Kubuntu 23.04 HOT 5
- Can't install on php 8.2.4 HOT 4
- Php 8.2 not supported? HOT 9
- PHP Fatal error: Uncaught TypeError: array_merge(): Argument #1 must be of type array HOT 5
- When will PHP 8.2 be supported? HOT 6
- Centos8 install php 8 error
- Cannot switch to PHP v8.2.8 HOT 1
- PHP 8.1.11 (or 12) pgsql pg_config... not found … Cannot find libpq-fe.h HOT 2
- "patch for fix readline detection" is broken HOT 3
- Release workflow may have some problems
- Problems with 2.2.0 HOT 6
- Was 2.2.0 retagged? HOT 1
- bad pattern issue with phpbrew in macos HOT 1
- RuntimeException: Can't decode release json, invalid JSON string: [] HOT 2
- Failed to install php 7.4.33 on Mac HOT 7
- Abnormal termination (Segfaults) when running compiled php 8.2 as FPM process HOT 1
- phpbrew ext install redis: Error: Command failed
- PHP 8.4 deprecation: Implicitly marking parameter as nullable is deprecated
- PHP 8.1 fails with libxml 2.12.0+ HOT 3
- Php 8.3 fails on EL8 (Rocky 8, Alma 8, Centos8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpbrew.