Skip to content

Commit

Permalink
Merge branch 'flow-php:1.x' into integration/symfony-string-after-last
Browse files Browse the repository at this point in the history
  • Loading branch information
f-lapinski authored Feb 27, 2025
2 parents 0d0ccf3 + b25afc0 commit b61e327
Show file tree
Hide file tree
Showing 72 changed files with 1,744 additions and 215 deletions.
3 changes: 3 additions & 0 deletions .nix/php/lib/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
php.ini
blackfire.ini
xdebug.ini
40 changes: 40 additions & 0 deletions .nix/php/lib/blackfire.ini.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[blackfire]
; On Windows use the following configuration:
; extension=php_blackfire.dll

; Sets fine-grained configuration for Probe.
; This should be left blank in most cases. For most installs,
; the server credentials should only be set in the agent.
;blackfire.server_id =

; Sets fine-grained configuration for Probe.
; This should be left blank in most cases. For most installs,
; the server credentials should only be set in the agent.
;blackfire.server_token =

; Log verbosity level:
; 4: debug
; 3: info
; 2: warning;
; 1: error
;blackfire.log_level = 1

; Log file (STDERR by default)
;blackfire.log_file = /tmp/blackfire.log

; Add the stacktrace to the probe logs when a segmentation fault occurs.
; Debug option inactive on Windows and Alpine.
;blackfire.debug.sigsegv_handler = 0

; Sets the socket where the agent is listening.
; Possible value can be a unix socket or a TCP address.
; Defaults values are:
; - Linux: unix:///var/run/blackfire/agent.sock
; - macOS amd64: unix:///usr/local/var/run/blackfire-agent.sock
; - macOS arm64 (M1): unix:///opt/homebrew/var/run/blackfire-agent.sock
; - Windows: tcp://127.0.0.1:8307
;blackfire.agent_socket = unix:///var/run/blackfire/agent.sock

; Enables Blackfire Monitoring
; Enabled by default since version 1.61.0
;blackfire.apm_enabled = 1
6 changes: 6 additions & 0 deletions .nix/php/lib/pcov.ini.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[pcov]
; pcov.enabled=1
; pcov.directory=.
; pcov.exclude=
; pcov.initial.memory=65536
; pcov.initial.files=64
10 changes: 10 additions & 0 deletions .nix/php/lib/php.ini.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
date.timezone = UTC
max_execution_time = 1800
max_input_time = 3600
max_input_nesting_level = 64
memory_limit = -1
post_max_size = 200M
upload_max_filesize = 150M
file_uploads = On
max_file_uploads = 20
short_open_tag = off
2 changes: 2 additions & 0 deletions .nix/php/lib/xdebug.ini.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[xdebug]
xdebug.mode=debug
68 changes: 68 additions & 0 deletions .nix/pkgs/flow-php/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
php,
php-snappy,
php-lz4,
php-brotli,
php-zstd,
with-pcov ? true,
with-xdebug ? false,
with-blackfire ? false
}:

let
flowPHP = php.withExtensions (
{ enabled, all }:
with all;
enabled
++ [
bcmath
dom
mbstring
(php-brotli.override { inherit php; })
(php-lz4.override { inherit php; })
(php-snappy.override { inherit php; })
(php-zstd.override { inherit php; })
xmlreader
xmlwriter
zlib
]
++ (if with-xdebug then [xdebug] else [])
++ (if with-pcov then [pcov] else [])
++ (if with-blackfire then [blackfire] else [])
);
in
flowPHP.buildEnv {
extraConfig = ""
+ (
if builtins.pathExists ./../../php/lib/php.ini
then builtins.readFile ./../../php/lib/php.ini
else builtins.readFile ./../../php/lib/php.ini.dist
)
+ "\n"
+ (
if with-xdebug
then
if builtins.pathExists ./../../php/lib/xdebug.ini
then builtins.readFile ./../../php/lib/xdebug.ini
else builtins.readFile ./../../php/lib/xdebug.ini.dist
else ""
)
+ "\n"
+ (
if with-blackfire
then
if builtins.pathExists ./../../php/lib/blackfire.ini
then builtins.readFile ./../../php/lib/blackfire.ini
else builtins.readFile ./../../php/lib/blackfire.ini.dist
else ""
)
+ "\n"
+ (
if with-pcov
then
if builtins.pathExists ./../../php/lib/pcov.ini
then builtins.readFile ./../../php/lib/pcov.ini
else builtins.readFile ./../../php/lib/pcov.ini.dist
else ""
);
}
17 changes: 17 additions & 0 deletions .nix/pkgs/php-brotli/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
php,
fetchFromGitHub,
}:

php.buildPecl {
pname = "brotli";
version = "0.13.1";

src = fetchFromGitHub {
owner = "kjdev";
repo = "php-ext-brotli";
tag = "0.13.1";
hash = "sha256-bdnTEEJUPe+VvXjncKbIi4wfnEn9UH7OBTKiUCET+qQ=";
fetchSubmodules = true;
};
}
14 changes: 14 additions & 0 deletions .nix/pkgs/php-lz4/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{ php, fetchFromGitHub }:

php.buildPecl {
pname = "lz4";
version = "0.4.4";

src = fetchFromGitHub {
owner = "kjdev";
repo = "php-ext-lz4";
tag = "0.4.4";
hash = "sha256-iKgMN77W5iR3jwOwKNwIpuLwkeDkQVTIppEp4fF1oZw=";
fetchSubmodules = true;
};
}
16 changes: 16 additions & 0 deletions .nix/pkgs/php-snappy/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{ php, fetchFromGitHub }:

php.buildPecl {
pname = "snappy";
version = "0.2.1";

src = fetchFromGitHub {
owner = "kjdev";
repo = "php-ext-snappy";
tag = "0.2.1";
hash = "sha256-PAKdIcpJKH6d74EulYQepP4XbQvccrj1nEuir47vro4=";
fetchSubmodules = true;
};

env.NIX_CXXFLAGS_COMPILE = "-std=c++11";
}
14 changes: 14 additions & 0 deletions .nix/pkgs/php-zstd/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{ php, fetchFromGitHub }:

php.buildPecl {
pname = "zstd";
version = "0.14.0";

src = fetchFromGitHub {
owner = "kjdev";
repo = "php-ext-zstd";
tag = "0.14.0";
hash = "sha256-oIbvaLYQ6Tp20Y/UEN7i1dtMnxGdMNcIjv6xRCyVYdE=";
fetchSubmodules = true;
};
}
1 change: 1 addition & 0 deletions .nix/shell/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
starship.toml
14 changes: 14 additions & 0 deletions .nix/shell/starship.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

# Directory of this script
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# Check if starship.toml exists, otherwise use starship.toml.dist
if [ -f "$SCRIPT_DIR/starship.toml" ]; then
export STARSHIP_CONFIG="$SCRIPT_DIR/starship.toml"
else
export STARSHIP_CONFIG="$SCRIPT_DIR/starship.toml.dist"
fi

# Initialize Starship prompt
eval "$(${pkgs.starship}/bin/starship init bash)"
10 changes: 10 additions & 0 deletions .nix/shell/starship.toml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[php]
style = "blue"
format = 'via [$symbol($version )]($style)'

[aws]
disabled = true
[azure]
disabled = true
[gcloud]
disabled = true
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## [Unreleased] - 2025-02-21
## [Unreleased] - 2025-02-26

### Added
- [#1497](https://github.com/flow-php/flow/pull/1497) - **DSL for Symfony Http Bridge** - [@norberttech](https://github.com/norberttech)
- [#1496](https://github.com/flow-php/flow/pull/1496) - **helper methods on Schema/Definition to manipulate metadata** - [@norberttech](https://github.com/norberttech)
- [#1495](https://github.com/flow-php/flow/pull/1495) - **Adds method `TransformerLoader::closure()` to delegate generator stop signals to proxied loaders.** - [@christianc1](https://github.com/christianc1)
- [#1468](https://github.com/flow-php/flow/pull/1468) - **Nix - for local development environment** - [@norberttech](https://github.com/norberttech)
- [#1492](https://github.com/flow-php/flow/pull/1492) - **Respect limit/offset from query builder in dbal query loader** - [@norberttech](https://github.com/norberttech)
- [#1491](https://github.com/flow-php/flow/pull/1491) - **Added missing tests to string functions** - [@f-lapinski](https://github.com/f-lapinski)
- [#1488](https://github.com/flow-php/flow/pull/1488) - **DataStream builder** - [@norberttech](https://github.com/norberttech)
Expand Down Expand Up @@ -96,6 +100,11 @@
- [#1244](https://github.com/flow-php/flow/pull/1244) - **Added CLI command to read schema from a file** - [@norberttech](https://github.com/norberttech)

### Changed
- [#1499](https://github.com/flow-php/flow/pull/1499) - **Return 204 for buffered response when dataset is empty** - [@norberttech](https://github.com/norberttech)
- [#1498](https://github.com/flow-php/flow/pull/1498) - **Allow to pass limit as null to avoid breaking a pipeline** - [@norberttech](https://github.com/norberttech)
- [#1497](https://github.com/flow-php/flow/pull/1497) - **Renamed API of Http Bridge Stream Builder** - [@norberttech](https://github.com/norberttech)
- [#1497](https://github.com/flow-php/flow/pull/1497) - **Moved generic Transformations from bridge to Core** - [@norberttech](https://github.com/norberttech)
- [#1496](https://github.com/flow-php/flow/pull/1496) - **Removed readonly from Schema Definition** - [@norberttech](https://github.com/norberttech)
- [#1493](https://github.com/flow-php/flow/pull/1493) - **Doctrine Dbal Adapter loader now expect options as an object** - [@norberttech](https://github.com/norberttech)
- [#1488](https://github.com/flow-php/flow/pull/1488) - **Moved Transformations to ETL Core** - [@norberttech](https://github.com/norberttech)
- [#1476](https://github.com/flow-php/flow/pull/1476) - **Allow to pass single type to is_type() method** - [@norberttech](https://github.com/norberttech)
Expand Down Expand Up @@ -171,6 +180,9 @@
- [#1240](https://github.com/flow-php/flow/pull/1240) - **Update Homebrew TAP formula: flow-php to version: 0.10.0** - [@norberttech](https://github.com/norberttech)

### Fixed
- [#1499](https://github.com/flow-php/flow/pull/1499) - **Prevent double ETL evaluation in buffered response** - [@norberttech](https://github.com/norberttech)
- [#1497](https://github.com/flow-php/flow/pull/1497) - **Fixed documentation** - [@norberttech](https://github.com/norberttech)
- [457164](https://github.com/flow-php/flow/commit/457164b233c9168df44ccf298a777121e1891861) - **broken upsert example** - [@norberttech](https://github.com/norberttech)
- [#1482](https://github.com/flow-php/flow/pull/1482) - **JSON was being double encoded.** - [@jmortlock](https://github.com/jmortlock)
- [#1483](https://github.com/flow-php/flow/pull/1483) - **Fix typo in README.md** - [@jmortlock](https://github.com/jmortlock)
- [#1475](https://github.com/flow-php/flow/pull/1475) - **Incosistency between XMLEntry::toString and Casting XML's to strings** - [@norberttech](https://github.com/norberttech)
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@
"src/lib/filesystem/src/Flow/Filesystem/DSL/functions.php",
"src/lib/parquet/src/Flow/Parquet/functions.php",
"src/lib/parquet/src/stubs.php",
"src/lib/snappy/polyfill.php"
"src/lib/snappy/polyfill.php",
"src/bridge/symfony/http-foundation/src/Flow/Bridge/Symfony/HttpFoundation/functions.php"
]
},
"autoload-dev": {
Expand Down
24 changes: 12 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b61e327

Please sign in to comment.