From de149dc36e34d045b18d412eba09dcf08fa17848 Mon Sep 17 00:00:00 2001 From: Railway Bot Date: Thu, 19 Jan 2023 12:11:26 -0800 Subject: [PATCH 01/61] Bump Ubuntu base image to `ubuntu-1673914250` (#768) Co-authored-by: coffee-cup --- src/nixpacks/images.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nixpacks/images.rs b/src/nixpacks/images.rs index d682c8c1a..a329d61cc 100644 --- a/src/nixpacks/images.rs +++ b/src/nixpacks/images.rs @@ -1,4 +1,4 @@ -pub const UBUNTU_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:ubuntu-1673375667"; +pub const UBUNTU_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:ubuntu-1673914250"; pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1673374436"; pub const DEFAULT_BASE_IMAGE: &str = UBUNTU_BASE_IMAGE; From a50091b56da9a20ec959c54cb9bde8401fdca3f9 Mon Sep 17 00:00:00 2001 From: Railway Bot Date: Mon, 23 Jan 2023 09:41:04 -0800 Subject: [PATCH 02/61] Bump base image (#767) Co-authored-by: coffee-cup Co-authored-by: Milo <50248166+Milo123459@users.noreply.github.com> --- src/nixpacks/images.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nixpacks/images.rs b/src/nixpacks/images.rs index a329d61cc..8cf653f8c 100644 --- a/src/nixpacks/images.rs +++ b/src/nixpacks/images.rs @@ -1,5 +1,5 @@ +pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1673913926"; pub const UBUNTU_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:ubuntu-1673914250"; -pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1673374436"; pub const DEFAULT_BASE_IMAGE: &str = UBUNTU_BASE_IMAGE; pub const STANDALONE_IMAGE: &str = "ubuntu:jammy"; From 7562afb34ceb3d43213552f50f9f9a8a91185fab Mon Sep 17 00:00:00 2001 From: Railway Bot Date: Mon, 23 Jan 2023 23:50:15 -0800 Subject: [PATCH 03/61] Bump base image (#770) --- src/nixpacks/images.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nixpacks/images.rs b/src/nixpacks/images.rs index 8cf653f8c..c1541e497 100644 --- a/src/nixpacks/images.rs +++ b/src/nixpacks/images.rs @@ -1,4 +1,4 @@ -pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1673913926"; +pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1674518720"; pub const UBUNTU_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:ubuntu-1673914250"; pub const DEFAULT_BASE_IMAGE: &str = UBUNTU_BASE_IMAGE; From f219071e1fb7e5bc4cd633e00727677c2c743e9f Mon Sep 17 00:00:00 2001 From: Jake Runzer Date: Fri, 27 Jan 2023 15:56:46 -0500 Subject: [PATCH 04/61] Fix lint issues (#772) * lint fix * alias for fixing lint issues * format * format --- .cargo/config.toml | 1 + src/main.rs | 2 +- .../builder/docker/dockerfile_generation.rs | 8 ++------ .../builder/docker/incremental_cache.rs | 3 +-- src/nixpacks/builder/docker/utils.rs | 5 +---- src/nixpacks/nix/mod.rs | 3 +-- src/providers/csharp.rs | 3 +-- src/providers/fsharp.rs | 3 +-- src/providers/java.rs | 3 +-- src/providers/php/mod.rs | 3 +-- src/providers/python.rs | 12 ++++------- src/providers/ruby.rs | 3 +-- src/providers/rust.rs | 20 ++++--------------- src/providers/swift.rs | 3 +-- src/providers/zig.rs | 3 +-- tests/docker_run_tests.rs | 15 ++++++-------- tests/generate_plan_tests.rs | 16 +++++---------- 17 files changed, 33 insertions(+), 73 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 43260b265..81814c173 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,3 +1,4 @@ [alias] generate_plan_tests = "test --package nixpacks --lib --test generate_plan_tests" snapshot = "insta test --review -- --test generate_plan_tests" +lint-fix = "clippy --fix --allow-dirty --allow-staged --all-targets --all-features -- -D warnings" diff --git a/src/main.rs b/src/main.rs index a8aa37cde..aa27df188 100644 --- a/src/main.rs +++ b/src/main.rs @@ -211,7 +211,7 @@ async fn main() -> Result<()> { PlanFormat::Toml => plan.to_toml()?, }; - println!("{}", plan_s); + println!("{plan_s}"); } Commands::Detect { path } => { let providers = get_plan_providers(&path, env, &options)?; diff --git a/src/nixpacks/builder/docker/dockerfile_generation.rs b/src/nixpacks/builder/docker/dockerfile_generation.rs index bb9570958..02b96b36f 100644 --- a/src/nixpacks/builder/docker/dockerfile_generation.rs +++ b/src/nixpacks/builder/docker/dockerfile_generation.rs @@ -119,8 +119,7 @@ impl DockerfileGenerator for BuildPlan { .context("Failed to convert nix file path to slash path.")?; nix_install_cmds.push(format!( - "COPY {nix_file_path} {nix_file_path}\nRUN nix-env -if {nix_file_path} && nix-collect-garbage -d", - nix_file_path = nix_file_path + "COPY {nix_file_path} {nix_file_path}\nRUN nix-env -if {nix_file_path} && nix-collect-garbage -d" )); } let nix_install_cmds = nix_install_cmds.join("\n"); @@ -361,10 +360,7 @@ impl DockerfileGenerator for Phase { let joined_paths = paths.join(":"); ( format!("ENV PATH {joined_paths}:$PATH"), - format!( - "RUN printf '\\nPATH={}:$PATH' >> /root/.profile", - joined_paths - ), + format!("RUN printf '\\nPATH={joined_paths}:$PATH' >> /root/.profile"), ) } else { (String::new(), String::new()) diff --git a/src/nixpacks/builder/docker/incremental_cache.rs b/src/nixpacks/builder/docker/incremental_cache.rs index 79635c95b..6a7fa61cc 100644 --- a/src/nixpacks/builder/docker/incremental_cache.rs +++ b/src/nixpacks/builder/docker/incremental_cache.rs @@ -135,8 +135,7 @@ impl IncrementalCache { .join("/"); vec![format!( - "COPY --from={} {} {}", - incremental_cahge_image, target_cache_dir_optional, target_cache_dir + "COPY --from={incremental_cahge_image} {target_cache_dir_optional} {target_cache_dir}" )] }) .collect::>() diff --git a/src/nixpacks/builder/docker/utils.rs b/src/nixpacks/builder/docker/utils.rs index 877c74fdb..4466cc75c 100644 --- a/src/nixpacks/builder/docker/utils.rs +++ b/src/nixpacks/builder/docker/utils.rs @@ -15,10 +15,7 @@ pub fn get_cache_mount( if !sanitized_dir.starts_with('/') { sanitized_dir = format!("/app/{sanitized_dir}"); } - format!( - "--mount=type=cache,id={},target={}", - sanitized_key, sanitized_dir - ) + format!("--mount=type=cache,id={sanitized_key},target={sanitized_dir}") }) .collect::>() .join(" "), diff --git a/src/nixpacks/nix/mod.rs b/src/nixpacks/nix/mod.rs index fd4e4a645..1cccd4208 100644 --- a/src/nixpacks/nix/mod.rs +++ b/src/nixpacks/nix/mod.rs @@ -124,8 +124,7 @@ fn nix_expression_for_group(group: &NixGroup) -> String { .join("\n"); let pkg_import = format!( - "import (fetchTarball \"https://github.com/NixOS/nixpkgs/archive/{}.tar.gz\")", - archive + "import (fetchTarball \"https://github.com/NixOS/nixpkgs/archive/{archive}.tar.gz\")" ); // If the openssl library is added, set the OPENSSL_DIR and OPENSSL_LIB_DIR environment variables diff --git a/src/providers/csharp.rs b/src/providers/csharp.rs index 4013d5f33..21dfed603 100644 --- a/src/providers/csharp.rs +++ b/src/providers/csharp.rs @@ -27,8 +27,7 @@ impl Provider for CSharpProvider { let setup = Phase::setup(Some(vec![Pkg::new("dotnet-sdk")])); let install = Phase::install(Some("dotnet restore".to_string())); let build = Phase::build(Some(format!( - "dotnet publish --no-restore -c Release -o {}", - ARTIFACT_DIR + "dotnet publish --no-restore -c Release -o {ARTIFACT_DIR}" ))); let csproj = &app.find_files("*.csproj")?[0].with_extension(""); diff --git a/src/providers/fsharp.rs b/src/providers/fsharp.rs index d56df79bb..0f050c7a4 100644 --- a/src/providers/fsharp.rs +++ b/src/providers/fsharp.rs @@ -27,8 +27,7 @@ impl Provider for FSharpProvider { let setup = Phase::setup(Some(vec![Pkg::new("dotnet-sdk")])); let install = Phase::install(Some("dotnet restore".to_string())); let build = Phase::build(Some(format!( - "dotnet publish --no-restore -c Release -o {}", - ARTIFACT_DIR + "dotnet publish --no-restore -c Release -o {ARTIFACT_DIR}" ))); let fsproj = &app.find_files("*.fsproj")?[0].with_extension(""); diff --git a/src/providers/java.rs b/src/providers/java.rs index f389199ee..b34997a75 100644 --- a/src/providers/java.rs +++ b/src/providers/java.rs @@ -58,8 +58,7 @@ impl Provider for JavaProvider { let setup = Phase::setup(Some(vec![jdk_pkg, Pkg::new("maven")])); let mvn_exe = self.get_maven_exe(app); - let mut build = Phase::build(Some(format!("{mvn_exe} -DoutputFile=target/mvn-dependency-list.log -B -DskipTests clean dependency:list install", - mvn_exe=mvn_exe + let mut build = Phase::build(Some(format!("{mvn_exe} -DoutputFile=target/mvn-dependency-list.log -B -DskipTests clean dependency:list install" ))); build.add_cache_directory(".m2/repository"); build.depends_on_phase("setup"); diff --git a/src/providers/php/mod.rs b/src/providers/php/mod.rs index 64e696cff..2c8b282a8 100644 --- a/src/providers/php/mod.rs +++ b/src/providers/php/mod.rs @@ -150,8 +150,7 @@ impl PhpProvider { "7.4".to_string() } else { println!( - "Warning: PHP version {} is not available, using PHP {}", - v, DEFAULT_PHP_VERSION + "Warning: PHP version {v} is not available, using PHP {DEFAULT_PHP_VERSION}" ); DEFAULT_PHP_VERSION.to_string() } diff --git a/src/providers/python.rs b/src/providers/python.rs index 847d02861..41039467f 100644 --- a/src/providers/python.rs +++ b/src/providers/python.rs @@ -145,8 +145,7 @@ impl PythonProvider { if app.includes_file("requirements.txt") { let mut install_phase = Phase::install(Some(format!( - "{} && {} && pip install -r requirements.txt", - create_env, activate_env + "{create_env} && {activate_env} && pip install -r requirements.txt" ))); install_phase.add_path(format!("{env_loc}/bin")); @@ -157,8 +156,7 @@ impl PythonProvider { if app.includes_file("poetry.lock") { let install_poetry = "pip install poetry==$NIXPACKS_POETRY_VERSION".to_string(); let mut install_phase = Phase::install(Some(format!( - "{} && {} && {} && poetry install --no-dev --no-interaction --no-ansi", - create_env, activate_env, install_poetry + "{create_env} && {activate_env} && {install_poetry} && poetry install --no-dev --no-interaction --no-ansi" ))); install_phase.add_path(format!("{env_loc}/bin")); @@ -168,8 +166,7 @@ impl PythonProvider { return Ok(Some(install_phase)); } let mut install_phase = Phase::install(Some(format!( - "{} && {} && pip install --upgrade build setuptools && pip install .", - create_env, activate_env + "{create_env} && {activate_env} && pip install --upgrade build setuptools && pip install ." ))); install_phase.add_file_dependency("pyproject.toml".to_string()); @@ -205,8 +202,7 @@ impl PythonProvider { let app_name = PythonProvider::get_django_app_name(app, env)?; return Ok(Some(StartPhase::new(format!( - "python manage.py migrate && gunicorn {}", - app_name + "python manage.py migrate && gunicorn {app_name}" )))); } diff --git a/src/providers/ruby.rs b/src/providers/ruby.rs index 43ef877e2..268a4f2e7 100644 --- a/src/providers/ruby.rs +++ b/src/providers/ruby.rs @@ -172,8 +172,7 @@ impl RubyProvider { ( "GEM_PATH".to_string(), format!( - "/usr/local/rvm/gems/{ruby_version}:/usr/local/rvm/gems/{ruby_version}@global", - ruby_version = ruby_version + "/usr/local/rvm/gems/{ruby_version}:/usr/local/rvm/gems/{ruby_version}@global" ), ), ( diff --git a/src/providers/rust.rs b/src/providers/rust.rs index 54f22050c..e14b87634 100644 --- a/src/providers/rust.rs +++ b/src/providers/rust.rs @@ -94,21 +94,13 @@ impl RustProvider { write!(build_cmd, " --package {workspace} --target {target}")?; build.add_cmd(build_cmd); - build.add_cmd(format!( - "cp target/{}/release/{name} bin", - target, - name = workspace - )); + build.add_cmd(format!("cp target/{target}/release/{workspace} bin")); } else { write!(build_cmd, " --target {target}")?; if let Some(name) = RustProvider::get_app_name(app)? { build.add_cmd(build_cmd); - build.add_cmd(format!( - "cp target/{}/release/{name} bin", - target, - name = name - )); + build.add_cmd(format!("cp target/{target}/release/{name} bin")); } } } else if let Some(workspace) = RustProvider::resolve_cargo_workspace(app, env)? { @@ -199,16 +191,12 @@ impl RustProvider { // Get the rust package version by parsing the `rust-version` field in `Cargo.toml` fn get_rust_pkg(app: &App, env: &Environment) -> Result { if let Some(version) = env.get_config_variable("RUST_VERSION") { - return Ok(Pkg::new(&format!( - "rust-bin.stable.\"{}\".default", - version - ))); + return Ok(Pkg::new(&format!("rust-bin.stable.\"{version}\".default"))); } if let Some(toolchain_file) = RustProvider::get_rust_toolchain_file(app) { return Ok(Pkg::new(&format!( - "(rust-bin.fromRustupToolchainFile ../{})", - toolchain_file + "(rust-bin.fromRustupToolchainFile ../{toolchain_file})" ))); } diff --git a/src/providers/swift.rs b/src/providers/swift.rs index 8fc50155f..dffa3f616 100644 --- a/src/providers/swift.rs +++ b/src/providers/swift.rs @@ -79,8 +79,7 @@ impl Provider for SwiftProvider { "CC=clang++ swift build -c release --static-swift-stdlib".to_string(), )); build.add_cmd(format!( - "cp ./.build/release/{name} ./{name} && rm -rf ./.build", - name = name + "cp ./.build/release/{name} ./{name} && rm -rf ./.build" )); let name = SwiftProvider::get_executable_name(app)?; diff --git a/src/providers/zig.rs b/src/providers/zig.rs index 053546d06..5b71466ca 100644 --- a/src/providers/zig.rs +++ b/src/providers/zig.rs @@ -66,8 +66,7 @@ impl ZigProvider { let gyro_supported_archs: Vec<&str> = vec!["x86_64", "aarch64", "i386"]; if gyro_supported_archs.contains(&ARCH) { format!( - "https://github.com/mattnite/gyro/releases/download/{}/gyro-{}-linux-{}.tar.gz", - GYRO_VERSION, GYRO_VERSION, ARCH + "https://github.com/mattnite/gyro/releases/download/{GYRO_VERSION}/gyro-{GYRO_VERSION}-linux-{ARCH}.tar.gz" ) } else { panic!("Gyro is not supported on your architecture ({ARCH}).") diff --git a/tests/docker_run_tests.rs b/tests/docker_run_tests.rs index df96508c4..42cc55d05 100644 --- a/tests/docker_run_tests.rs +++ b/tests/docker_run_tests.rs @@ -21,7 +21,7 @@ async fn get_container_ids_from_image(image: &str) -> String { .arg("-a") .arg("-q") .arg("--filter") - .arg(format!("ancestor={}", image)) + .arg(format!("ancestor={image}")) .output() .expect("failed to execute docker ps"); @@ -76,7 +76,7 @@ async fn run_image(name: &str, cfg: Option) -> String { if let Some(config) = cfg { for (key, value) in config.environment_variables { // arg must be processed as str or else we get extra quotes - let arg = format!("{}={}", key, value); + let arg = format!("{key}={value}"); cmd.arg("-e").arg(arg); } if let Some(network) = config.network { @@ -200,7 +200,7 @@ fn run_postgres() -> Container { let mut docker_cmd = Command::new("docker"); let hash = Uuid::new_v4().to_string(); - let container_name = format!("postgres-{}", hash); + let container_name = format!("postgres-{hash}"); let password = hash; let port = "5432"; // run @@ -239,10 +239,7 @@ fn run_postgres() -> Container { ("PGHOST".to_string(), container_name.clone()), ( "DATABASE_URL".to_string(), - format!( - "postgresql://postgres:{}@{}:{}/postgres", - password, container_name, port - ), + format!("postgresql://postgres:{password}@{container_name}:{port}/postgres"), ), ]), network: None, @@ -254,7 +251,7 @@ fn run_mysql() -> Container { let mut docker_cmd = Command::new("docker"); let hash = Uuid::new_v4().to_string(); - let container_name = format!("mysql-{}", hash); + let container_name = format!("mysql-{hash}"); let password = hash; // run docker_cmd.arg("run"); @@ -338,7 +335,7 @@ async fn test_elixir_no_ecto() { .take(64) .map(char::from) .collect(); - let secret_env = format!("SECRET_KEY_BASE={}", rand_64_str); + let secret_env = format!("SECRET_KEY_BASE={rand_64_str}"); let name = build_with_build_time_env_vars( "./examples/elixir_no_ecto", vec![&*secret_env, "MIX_ENV=prod"], diff --git a/tests/generate_plan_tests.rs b/tests/generate_plan_tests.rs index 931508d59..22e2ae3c4 100644 --- a/tests/generate_plan_tests.rs +++ b/tests/generate_plan_tests.rs @@ -28,11 +28,8 @@ fn test_custom_rust_version() { build.cmds, Some(vec![ format!("mkdir -p bin"), - format!("cargo build --release --target {}-unknown-linux-musl", ARCH), - format!( - "cp target/{}-unknown-linux-musl/release/rust-custom-version bin", - ARCH - ) + format!("cargo build --release --target {ARCH}-unknown-linux-musl"), + format!("cp target/{ARCH}-unknown-linux-musl/release/rust-custom-version bin") ]) ); assert_eq!( @@ -56,8 +53,8 @@ fn test_rust_rocket() { build.cmds, Some(vec![ format!("mkdir -p bin"), - format!("cargo build --release --target {}-unknown-linux-musl", ARCH), - format!("cp target/{}-unknown-linux-musl/release/rocket bin", ARCH) + format!("cargo build --release --target {ARCH}-unknown-linux-musl"), + format!("cp target/{ARCH}-unknown-linux-musl/release/rocket bin") ]) ); assert!(start.cmd.is_some()); @@ -83,10 +80,7 @@ fn test_rust_cargo_workspaces() { assert_eq!( build.clone().cmds.unwrap()[1], - format!( - "cargo build --release --package binary --target {}-unknown-linux-musl", - ARCH - ) + format!("cargo build --release --package binary --target {ARCH}-unknown-linux-musl") ); } From ba8cc0fc590b22f04a1503b6fd91a088b4ff88d6 Mon Sep 17 00:00:00 2001 From: James Pulec Date: Sat, 28 Jan 2023 00:10:23 -0800 Subject: [PATCH 05/61] Fix typo (#773) --- docs/pages/docs/providers/node.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/docs/providers/node.md b/docs/pages/docs/providers/node.md index 8b3257afb..74e2a6704 100644 --- a/docs/pages/docs/providers/node.md +++ b/docs/pages/docs/providers/node.md @@ -37,7 +37,7 @@ If [node-canvas](https://www.npmjs.com/package/canvas) is found in the `package. ## Install -All dependencies found in `packages.json` are installed with either NPM, Yarn, PNPM, or Bun (depending on the lockfile detected). +All dependencies found in `package.json` are installed with either NPM, Yarn, PNPM, or Bun (depending on the lockfile detected). ## Build From 8b82198d9a9acf958b4fcf45a8a0a50a88cc4d37 Mon Sep 17 00:00:00 2001 From: Radford Smith <11401+rads@users.noreply.github.com> Date: Sat, 28 Jan 2023 10:21:54 -0800 Subject: [PATCH 06/61] Add support for Clojure `tools.build` projects (#771) * Add support for Clojure tools.build projects * Update build_cmd ordering * Update docs * Fix formatting * Add snapshot test * Update src/providers/clojure.rs Co-authored-by: Jake Runzer --------- Co-authored-by: Jake Runzer --- docs/pages/docs/providers/clojure.md | 11 ++++-- examples/clojure-tools-build/.gitignore | 1 + examples/clojure-tools-build/DOCKERFILE | 0 examples/clojure-tools-build/build.clj | 23 ++++++++++++ examples/clojure-tools-build/deps.edn | 7 ++++ .../src/clojure_example/core.clj | 7 ++++ src/providers/clojure.rs | 34 +++++++++++++----- tests/docker_run_tests.rs | 7 ++++ ...erate_plan_tests__clojure_tools_build.snap | 35 +++++++++++++++++++ 9 files changed, 114 insertions(+), 11 deletions(-) create mode 100644 examples/clojure-tools-build/.gitignore create mode 100644 examples/clojure-tools-build/DOCKERFILE create mode 100644 examples/clojure-tools-build/build.clj create mode 100644 examples/clojure-tools-build/deps.edn create mode 100644 examples/clojure-tools-build/src/clojure_example/core.clj create mode 100644 tests/snapshots/generate_plan_tests__clojure_tools_build.snap diff --git a/docs/pages/docs/providers/clojure.md b/docs/pages/docs/providers/clojure.md index 5e25739c4..1f27100a8 100644 --- a/docs/pages/docs/providers/clojure.md +++ b/docs/pages/docs/providers/clojure.md @@ -4,7 +4,7 @@ title: Clojure # {% $markdoc.frontmatter.title %} -Clojure is detected if a `project.clj` file is found. +Clojure is detected if a `project.clj` or `build.clj` file is found. ## Setup @@ -21,7 +21,12 @@ The version can be overriden by ## Build -If `lein-ring` plugin detected +If a `build.clj` file for [`tools.build`](https://clojure.org/guides/tools_build) is found: +``` +clojure -T:build uber; if [ -f /app/target/uberjar/*standalone.jar ]; then mv /app/target/uberjar/*standalone.jar /app/target/*standalone.jar; fi +``` + +If the `lein-ring` plugin is found: ``` lein ring uberjar; if [ -f /app/target/uberjar/*standalone.jar ]; then mv /app/target/uberjar/standalone.jar /app/target/*standalone.jar; fi @@ -37,4 +42,4 @@ lein uberjar; if [ -f /app/target/uberjar/*standalone.jar ]; then mv /app/target ``` java $JAVA_OPTS -jar /app/target/*standalone.jar -``` \ No newline at end of file +``` diff --git a/examples/clojure-tools-build/.gitignore b/examples/clojure-tools-build/.gitignore new file mode 100644 index 000000000..825c60d69 --- /dev/null +++ b/examples/clojure-tools-build/.gitignore @@ -0,0 +1 @@ +/.cpcache diff --git a/examples/clojure-tools-build/DOCKERFILE b/examples/clojure-tools-build/DOCKERFILE new file mode 100644 index 000000000..e69de29bb diff --git a/examples/clojure-tools-build/build.clj b/examples/clojure-tools-build/build.clj new file mode 100644 index 000000000..e69bdd3ae --- /dev/null +++ b/examples/clojure-tools-build/build.clj @@ -0,0 +1,23 @@ +(ns build + (:require [clojure.tools.build.api :as b])) + +(def lib 'clojure-example) +(def version (format "1.2.%s" (b/git-count-revs nil))) +(def class-dir "target/classes") +(def basis (b/create-basis {:project "deps.edn"})) +(def uber-file (format "target/%s-%s-standalone.jar" (name lib) version)) + +(defn clean [_] + (b/delete {:path "target"})) + +(defn uber [_] + (clean nil) + (b/copy-dir {:src-dirs ["src" "resources"] + :target-dir class-dir}) + (b/compile-clj {:basis basis + :src-dirs ["src"] + :class-dir class-dir}) + (b/uber {:class-dir class-dir + :uber-file uber-file + :basis basis + :main 'clojure-example.core})) diff --git a/examples/clojure-tools-build/deps.edn b/examples/clojure-tools-build/deps.edn new file mode 100644 index 000000000..9226936af --- /dev/null +++ b/examples/clojure-tools-build/deps.edn @@ -0,0 +1,7 @@ +{:paths ["src"] ;; project paths + :deps {} ;; project deps + + :aliases + {;; Run with clj -T:build function-in-build + :build {:deps {io.github.clojure/tools.build {:git/tag "v0.9.2" :git/sha "fe6b140"}} + :ns-default build}}} diff --git a/examples/clojure-tools-build/src/clojure_example/core.clj b/examples/clojure-tools-build/src/clojure_example/core.clj new file mode 100644 index 000000000..293115789 --- /dev/null +++ b/examples/clojure-tools-build/src/clojure_example/core.clj @@ -0,0 +1,7 @@ +(ns clojure-example.core + (:gen-class)) + +(defn -main + "I don't do a whole lot ... yet." + [& args] + (println "Hello, World From Clojure!")) diff --git a/src/providers/clojure.rs b/src/providers/clojure.rs index 33f4a9196..3a2c2c52b 100644 --- a/src/providers/clojure.rs +++ b/src/providers/clojure.rs @@ -21,21 +21,22 @@ impl Provider for ClojureProvider { } fn detect(&self, app: &App, _env: &Environment) -> Result { - Ok(app.includes_file("project.clj")) + Ok(self.is_using_lein(app) || self.is_using_tools_build(app)) } fn get_build_plan(&self, app: &App, env: &Environment) -> Result> { let setup = Phase::setup(Some(vec![ - Pkg::new("leiningen"), + if self.is_using_tools_build(app) { + Pkg::new("clojure") + } else { + Pkg::new("leiningen") + }, ClojureProvider::get_nix_jdk_package(app, env)?, ])); - let has_lein_ring_plugin = app - .read_file("project.clj")? - .to_lowercase() - .contains("[lein-ring "); - - let build_cmd = if has_lein_ring_plugin { + let build_cmd = if self.is_using_tools_build(app) { + "clojure -T:build uber" + } else if self.has_lein_ring_plugin(app) { "lein ring uberjar" } else { "lein uberjar" @@ -54,6 +55,23 @@ impl Provider for ClojureProvider { } impl ClojureProvider { + fn has_lein_ring_plugin(&self, app: &App) -> bool { + self.is_using_lein(app) + && app + .read_file("project.clj") + .unwrap_or_default() + .to_lowercase() + .contains("[lein-ring ") + } + + fn is_using_lein(&self, app: &App) -> bool { + app.includes_file("project.clj") + } + + fn is_using_tools_build(&self, app: &App) -> bool { + app.includes_file("build.clj") + } + fn get_custom_version(app: &App, env: &Environment) -> Result { // Fetch version from configs let mut custom_version = env.get_config_variable("JDK_VERSION"); diff --git a/tests/docker_run_tests.rs b/tests/docker_run_tests.rs index 42cc55d05..e21914a7c 100644 --- a/tests/docker_run_tests.rs +++ b/tests/docker_run_tests.rs @@ -905,6 +905,13 @@ async fn test_clojure_ring_app() { assert_eq!(output, "Started server on port 3000"); } +#[tokio::test] +async fn test_clojure_tools_build() { + let name = simple_build("./examples/clojure-tools-build").await; + let output = run_image(&name, None).await; + assert_eq!(output, "Hello, World From Clojure!"); +} + #[tokio::test] async fn test_cobol() { let name = simple_build("./examples/cobol").await; diff --git a/tests/snapshots/generate_plan_tests__clojure_tools_build.snap b/tests/snapshots/generate_plan_tests__clojure_tools_build.snap new file mode 100644 index 000000000..141dc98a8 --- /dev/null +++ b/tests/snapshots/generate_plan_tests__clojure_tools_build.snap @@ -0,0 +1,35 @@ +--- +source: tests/generate_plan_tests.rs +expression: plan +--- +{ + "providers": [], + "buildImage": "[build_image]", + "variables": { + "NIXPACKS_METADATA": "clojure" + }, + "phases": { + "build": { + "name": "build", + "dependsOn": [ + "install", + "setup" + ], + "cmds": [ + "clojure -T:build uber; if [ -f /app/target/default+uberjar/*standalone.jar ]; then mv /app/target/default+uberjar/*standalone.jar /app/target/*standalone.jar; fi" + ] + }, + "setup": { + "name": "setup", + "nixPkgs": [ + "clojure", + "jdk8" + ], + "nixOverlays": [], + "nixpkgsArchive": "[archive]" + } + }, + "start": { + "cmd": "bash -c \"java $JAVA_OPTS -jar /app/target/*standalone.jar\"" + } +} From e15e4220dd11e443d8e7e25e2f16f5c92f89b551 Mon Sep 17 00:00:00 2001 From: Milo <50248166+Milo123459@users.noreply.github.com> Date: Sat, 28 Jan 2023 18:22:17 +0000 Subject: [PATCH 07/61] fix some spelling (#774) --- docs/pages/docs/providers/clojure.md | 2 +- docs/pages/docs/providers/elixir.md | 2 +- docs/pages/docs/providers/java.md | 6 +++--- docs/pages/docs/providers/node.md | 2 +- docs/pages/docs/providers/python.md | 2 +- docs/pages/docs/providers/swift.md | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/pages/docs/providers/clojure.md b/docs/pages/docs/providers/clojure.md index 1f27100a8..8296e3513 100644 --- a/docs/pages/docs/providers/clojure.md +++ b/docs/pages/docs/providers/clojure.md @@ -14,7 +14,7 @@ The following JDK versions are available - `11` - `latest` -The version can be overriden by +The version can be overridden by - Setting the `NIXPACKS_JDK_VERSION` environment variable - Setting the version in a `.jdk-version` file diff --git a/docs/pages/docs/providers/elixir.md b/docs/pages/docs/providers/elixir.md index 33f022b4d..3e3254584 100644 --- a/docs/pages/docs/providers/elixir.md +++ b/docs/pages/docs/providers/elixir.md @@ -15,7 +15,7 @@ The following Elixir versions are available - `1.10` - `1.9` -The version can be overriden by +The version can be overridden by - Setting the `NIXPACKS_ELIXIR_VERSION` environment variable - Setting the version in a `.elixir-version` file diff --git a/docs/pages/docs/providers/java.md b/docs/pages/docs/providers/java.md index 613159bb1..6443b6111 100644 --- a/docs/pages/docs/providers/java.md +++ b/docs/pages/docs/providers/java.md @@ -17,18 +17,18 @@ The following major JDK versions are available - `11` - `8` -The version can be overriden by setting the `NIXPACKS_JDK_VERSION` environment variable. +The version can be overridden by setting the `NIXPACKS_JDK_VERSION` environment variable. ### Gradle -The following major Gradle verions are available +The following major Gradle versions are available - `7` (Default) - `6` - `5` - `4` -The version can be overriden by setting the `NIXPACKS_GRADLE_VERSION` environment variable. +The version can be overridden by setting the `NIXPACKS_GRADLE_VERSION` environment variable. ## Build diff --git a/docs/pages/docs/providers/node.md b/docs/pages/docs/providers/node.md index 74e2a6704..dc28542ae 100644 --- a/docs/pages/docs/providers/node.md +++ b/docs/pages/docs/providers/node.md @@ -24,7 +24,7 @@ The following major versions are available - `16` (Default) - `18` -The version can be overriden by +The version can be overridden by - Setting the `NIXPACKS_NODE_VERSION` environment variable - Specifying the `engines.node` field in `package.json` diff --git a/docs/pages/docs/providers/python.md b/docs/pages/docs/providers/python.md index d747869ce..08b0872d3 100644 --- a/docs/pages/docs/providers/python.md +++ b/docs/pages/docs/providers/python.md @@ -17,7 +17,7 @@ The following Python versions are available - `3.7` - `2.7` -The version can be overriden by +The version can be overridden by - Setting the `NIXPACKS_PYTHON_VERSION` environment variable - Setting the version in a `.python-version` file diff --git a/docs/pages/docs/providers/swift.md b/docs/pages/docs/providers/swift.md index d2a0defe3..653409ff3 100644 --- a/docs/pages/docs/providers/swift.md +++ b/docs/pages/docs/providers/swift.md @@ -21,7 +21,7 @@ The following Swift versions are available - `3.1` - `3.1.1` -The version can be overriden by +The version can be overridden by - Setting the version in a `.swift-version` file - Specifying a `swift-tools-version` field in `Package.swift` From 5a1b93e9c0a03b0ee97570cc445b90b37d6a24db Mon Sep 17 00:00:00 2001 From: Patrick Serrano Date: Mon, 30 Jan 2023 13:49:51 -0500 Subject: [PATCH 08/61] feat(csharp): allow configurable sdk version (#766) Co-authored-by: Milo <50248166+Milo123459@users.noreply.github.com> Closes https://github.com/railwayapp/nixpacks/issues/323 --- .cargo/config.toml | 2 +- docs/pages/docs/providers/csharp.md | 5 + examples/csharp-api/global.json | 5 + src/providers/csharp.rs | 95 ++++++++++++++++++- .../generate_plan_tests__csharp_api.snap | 2 +- 5 files changed, 105 insertions(+), 4 deletions(-) create mode 100644 examples/csharp-api/global.json diff --git a/.cargo/config.toml b/.cargo/config.toml index 81814c173..a4ea07715 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,4 +1,4 @@ [alias] -generate_plan_tests = "test --package nixpacks --lib --test generate_plan_tests" +generate-plan-tests = "test --package nixpacks --lib --test generate_plan_tests" snapshot = "insta test --review -- --test generate_plan_tests" lint-fix = "clippy --fix --allow-dirty --allow-staged --all-targets --all-features -- -D warnings" diff --git a/docs/pages/docs/providers/csharp.md b/docs/pages/docs/providers/csharp.md index 902063e64..889e34185 100644 --- a/docs/pages/docs/providers/csharp.md +++ b/docs/pages/docs/providers/csharp.md @@ -6,6 +6,11 @@ title: C# CSharp is detected if any `*.csproj*` files are found. +The SDK version can be overridden by + +- Setting the `NIXPACKS_CSHARP_SDK_VERSION` environment variable +- Setting the version in a `global.json` file + ## Install ``` diff --git a/examples/csharp-api/global.json b/examples/csharp-api/global.json new file mode 100644 index 000000000..86f1e0c90 --- /dev/null +++ b/examples/csharp-api/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "7.0.0" + } +} diff --git a/src/providers/csharp.rs b/src/providers/csharp.rs index 21dfed603..90fc0b6b5 100644 --- a/src/providers/csharp.rs +++ b/src/providers/csharp.rs @@ -9,6 +9,17 @@ use crate::nixpacks::{ }, }; use anyhow::{Context, Result}; +use serde::{Deserialize, Serialize}; + +#[derive(Serialize, Deserialize, Default, Debug)] +pub struct CSharpSdk { + pub version: Option, +} + +#[derive(Serialize, Deserialize, Default, Debug)] +pub struct CSharpGlobalJson { + pub sdk: Option, +} pub struct CSharpProvider {} @@ -23,8 +34,9 @@ impl Provider for CSharpProvider { Ok(!app.find_files("*.csproj")?.is_empty()) } - fn get_build_plan(&self, app: &App, _env: &Environment) -> Result> { - let setup = Phase::setup(Some(vec![Pkg::new("dotnet-sdk")])); + fn get_build_plan(&self, app: &App, env: &Environment) -> Result> { + let sdk = CSharpProvider::get_sdk_version(app, env); + let setup = Phase::setup(Some(vec![Pkg::new(sdk?.as_str())])); let install = Phase::install(Some("dotnet restore".to_string())); let build = Phase::build(Some(format!( "dotnet publish --no-restore -c Release -o {ARTIFACT_DIR}" @@ -57,3 +69,82 @@ impl Provider for CSharpProvider { Ok(Some(plan)) } } + +impl CSharpProvider { + fn get_sdk_version(app: &App, env: &Environment) -> Result { + // First check for an SDK version environment variable + if let Some(version) = env.get_config_variable("CSHARP_SDK_VERSION") { + if let Some((major, minor)) = &version[0..3].split_once('.') { + return Ok(format!("dotnet-sdk_{major}_{minor}")); + } + } + + // Then check for a global.json and see if we can get the sdk version from there + if app.includes_file("global.json") { + let global_json: CSharpGlobalJson = app.read_json("global.json")?; + + if let Some(sdk) = global_json.sdk { + if let Some(version) = sdk.version { + if let Some((major, minor)) = &version[0..3].split_once('.') { + return Ok(format!("dotnet-sdk_{major}_{minor}")); + } + } + } + } + + // Fall back to default sdk + Ok("dotnet-sdk".to_string()) + } +} + +#[cfg(test)] +mod test { + use super::*; + use crate::nixpacks::{app::App, environment::Environment}; + use std::collections::BTreeMap; + + #[test] + fn test_no_version() -> Result<()> { + let expected_sdk_name = "dotnet-sdk"; + assert_eq!( + CSharpProvider::get_sdk_version( + &App::new("./examples/csharp-cli")?, + &Environment::default() + )?, + expected_sdk_name + ); + + Ok(()) + } + + #[test] + fn test_global_json() -> Result<()> { + let expected_sdk_name = "dotnet-sdk_7_0"; + assert_eq!( + CSharpProvider::get_sdk_version( + &App::new("./examples/csharp-api")?, + &Environment::default() + )?, + expected_sdk_name + ); + + Ok(()) + } + + #[test] + fn test_version_from_environment_variable() -> Result<()> { + let expected_sdk_name = "dotnet-sdk_6_0"; + assert_eq!( + CSharpProvider::get_sdk_version( + &App::new("./examples/csharp-cli")?, + &Environment::new(BTreeMap::from([( + "NIXPACKS_CSHARP_SDK_VERSION".to_string(), + "6.0.0".to_string() + )])) + )?, + expected_sdk_name + ); + + Ok(()) + } +} diff --git a/tests/snapshots/generate_plan_tests__csharp_api.snap b/tests/snapshots/generate_plan_tests__csharp_api.snap index 1077ce996..47c14ee3e 100644 --- a/tests/snapshots/generate_plan_tests__csharp_api.snap +++ b/tests/snapshots/generate_plan_tests__csharp_api.snap @@ -33,7 +33,7 @@ expression: plan "setup": { "name": "setup", "nixPkgs": [ - "dotnet-sdk" + "dotnet-sdk_7_0" ], "nixOverlays": [], "nixpkgsArchive": "[archive]" From ddb6ad67b69a17ff6d661db4f45e88c5d4e1af6b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Jan 2023 12:59:57 +0530 Subject: [PATCH 09/61] Bump docker/build-push-action from 3 to 4 (#778) --- .github/workflows/publish_debian.yml | 4 ++-- .github/workflows/publish_ubuntu.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish_debian.yml b/.github/workflows/publish_debian.yml index d97a0aca5..1bd60b675 100644 --- a/.github/workflows/publish_debian.yml +++ b/.github/workflows/publish_debian.yml @@ -47,7 +47,7 @@ jobs: run: echo "::set-output name=date::$(date +%s)" - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: base/debian platforms: linux/arm64, linux/amd64, linux/386 @@ -78,7 +78,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push to Docker Hub - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: base/debian platforms: linux/arm64, linux/amd64, linux/386 diff --git a/.github/workflows/publish_ubuntu.yml b/.github/workflows/publish_ubuntu.yml index 72f7ad64e..42c9ba93c 100644 --- a/.github/workflows/publish_ubuntu.yml +++ b/.github/workflows/publish_ubuntu.yml @@ -47,7 +47,7 @@ jobs: run: echo "::set-output name=date::$(date +%s)" - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: base/ubuntu platforms: linux/arm64, linux/amd64 @@ -78,7 +78,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push to Docker Hub - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: base/ubuntu platforms: linux/arm64, linux/amd64 From bd87d474b500d304d527baa5480cafa7b6c4ec3b Mon Sep 17 00:00:00 2001 From: Railway Bot Date: Tue, 31 Jan 2023 03:27:32 -0800 Subject: [PATCH 10/61] Bump Debian base image to `debian-1675123546` (#776) Co-authored-by: coffee-cup --- src/nixpacks/images.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nixpacks/images.rs b/src/nixpacks/images.rs index c1541e497..e3963c65a 100644 --- a/src/nixpacks/images.rs +++ b/src/nixpacks/images.rs @@ -1,4 +1,4 @@ -pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1674518720"; +pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1675123546"; pub const UBUNTU_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:ubuntu-1673914250"; pub const DEFAULT_BASE_IMAGE: &str = UBUNTU_BASE_IMAGE; From 1c0e460cf3c98d352d506e3d9846f2df06273e4e Mon Sep 17 00:00:00 2001 From: Railway Bot Date: Tue, 31 Jan 2023 03:28:51 -0800 Subject: [PATCH 11/61] Bump Ubuntu base image to `ubuntu-1675123887` (#777) Co-authored-by: coffee-cup Co-authored-by: Milo <50248166+Milo123459@users.noreply.github.com> --- src/nixpacks/images.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nixpacks/images.rs b/src/nixpacks/images.rs index e3963c65a..fa696fa24 100644 --- a/src/nixpacks/images.rs +++ b/src/nixpacks/images.rs @@ -1,5 +1,5 @@ pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1675123546"; -pub const UBUNTU_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:ubuntu-1673914250"; +pub const UBUNTU_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:ubuntu-1675123887"; pub const DEFAULT_BASE_IMAGE: &str = UBUNTU_BASE_IMAGE; pub const STANDALONE_IMAGE: &str = "ubuntu:jammy"; From 5da6c156e0b9dea9e15b08c782749757c445d678 Mon Sep 17 00:00:00 2001 From: Kuba Ellwart <57842793+pxseu@users.noreply.github.com> Date: Fri, 3 Feb 2023 02:26:07 +0100 Subject: [PATCH 12/61] feat: add support for multiple rust binaries (#780) * feat: add support for multiple rust binaries * feat: update rust provider docs * fix: git conflict --- docs/pages/docs/providers/rust.md | 3 ++ src/providers/rust.rs | 87 ++++++++++++++++++++++++++----- 2 files changed, 78 insertions(+), 12 deletions(-) diff --git a/docs/pages/docs/providers/rust.md b/docs/pages/docs/providers/rust.md index 2d66a2036..a2a602012 100644 --- a/docs/pages/docs/providers/rust.md +++ b/docs/pages/docs/providers/rust.md @@ -35,6 +35,9 @@ cargo build --release ## Start +If your project has multiple binaries, you can specify which one to run with the `NIXPACKS_RUST_BIN` environment variable. +Optionally, it can override with the `default_run` property in `Cargo.toml` under the `[package]` section. + ``` ./target/release/{name} ``` diff --git a/src/providers/rust.rs b/src/providers/rust.rs index e14b87634..91e85b73b 100644 --- a/src/providers/rust.rs +++ b/src/providers/rust.rs @@ -95,21 +95,25 @@ impl RustProvider { build.add_cmd(build_cmd); build.add_cmd(format!("cp target/{target}/release/{workspace} bin")); - } else { + } else if let Some(bins) = RustProvider::get_bins(app)? { write!(build_cmd, " --target {target}")?; - if let Some(name) = RustProvider::get_app_name(app)? { - build.add_cmd(build_cmd); - build.add_cmd(format!("cp target/{target}/release/{name} bin")); + build.add_cmd(build_cmd); + + for bin in bins { + build.add_cmd(format!("cp target/{target}/release/{bin} bin")); } } } else if let Some(workspace) = RustProvider::resolve_cargo_workspace(app, env)? { write!(build_cmd, " --package {workspace}")?; build.add_cmd(build_cmd); build.add_cmd(format!("cp target/release/{workspace} bin")); - } else if let Some(name) = RustProvider::get_app_name(app)? { + } else if let Some(bins) = RustProvider::get_bins(app)? { build.add_cmd(build_cmd); - build.add_cmd(format!("cp target/release/{name} bin")); + + for bin in bins { + build.add_cmd(format!("cp target/release/{bin} bin")); + } } build.add_cache_directory(CARGO_GIT_CACHE_DIR.to_string()); @@ -123,6 +127,36 @@ impl RustProvider { Ok(build) } + fn get_bins(app: &App) -> Result>> { + let mut bins = vec![]; + + if app.includes_directory("src/bin") { + let find_bins = app.find_files("src/bin/*")?; + + for bin in find_bins { + let bin_name = bin + .file_name() + .context("Could not get file name for bin")? + .to_str() + .context("Could not convert bin name to string")? + .split('.') + .collect::>(); + + let bin_name = bin_name[0..bin_name.len() - 1].join("."); + + bins.push(bin_name); + } + + return Ok(Some(bins)); + } else if let Some(name) = RustProvider::get_app_name(app)? { + bins.push(name); + + return Ok(Some(bins)); + } + + Ok(None) + } + fn get_start(app: &App, env: &Environment) -> Result> { if (RustProvider::get_target(app, env)?).is_some() { if let Some(workspace) = RustProvider::resolve_cargo_workspace(app, env)? { @@ -131,19 +165,18 @@ impl RustProvider { start.add_file_dependency(format!("./bin/{workspace}")); Ok(Some(start)) - } else if let Some(name) = RustProvider::get_app_name(app)? { - let mut start = StartPhase::new(format!("./bin/{name}")); + } else if let Some(bin) = RustProvider::get_start_bin(app, env)? { + let mut start = StartPhase::new(bin.clone()); start.run_in_slim_image(); - start.add_file_dependency(format!("./bin/{name}")); - + start.add_file_dependency(bin); Ok(Some(start)) } else { Ok(None) } } else if let Some(workspace) = RustProvider::resolve_cargo_workspace(app, env)? { Ok(Some(StartPhase::new(format!("./bin/{workspace}")))) - } else if let Some(name) = RustProvider::get_app_name(app)? { - Ok(Some(StartPhase::new(format!("./bin/{name}")))) + } else if let Some(bin) = RustProvider::get_start_bin(app, env)? { + Ok(Some(StartPhase::new(bin))) } else { Ok(None) } @@ -160,6 +193,36 @@ impl RustProvider { Ok(None) } + fn get_start_bin(app: &App, env: &Environment) -> Result> { + if let Some(bins) = RustProvider::get_bins(app)? { + let mut bin: Option = None; + + if bins.len() == 1 { + bin = Some(bins[0].clone()); + } else if let Some(env_bin_name) = env.get_config_variable("RUST_BIN") { + let found_bin = bins + .into_iter() + .find(|bin| bin == &env_bin_name) + .context(format!("Could not find binary named {env_bin_name}"))?; + + bin = Some(found_bin); + } else if let Some(found_bin) = RustProvider::parse_cargo_toml(app)? + .and_then(|manifest| manifest.package) + .and_then(|package| package.default_run) + { + bin = Some(found_bin); + } + + if let Some(bin) = bin { + Ok(Some(format!("./bin/{bin}"))) + } else { + Ok(None) + } + } else { + Ok(None) + } + } + fn get_target(app: &App, env: &Environment) -> Result> { if RustProvider::should_use_musl(app, env)? { Ok(Some(format!("{ARCH}-unknown-linux-musl"))) From 73f9f2b1c747a3f32e70bc44511c5db0f834c74d Mon Sep 17 00:00:00 2001 From: Jake Runzer Date: Fri, 3 Feb 2023 17:41:30 -0500 Subject: [PATCH 13/61] docker run test for rust with multiple bins (#781) * docker run test for rust with multiple bins * fix dir name --- examples/rust-multiple-bins/.gitignore | 1 + examples/rust-multiple-bins/Cargo.toml | 9 +++++++++ examples/rust-multiple-bins/src/bin/bin1.rs | 3 +++ examples/rust-multiple-bins/src/bin/bin2.rs | 3 +++ test-helper/src/lib.rs | 1 + tests/docker_run_tests.rs | 7 +++++++ 6 files changed, 24 insertions(+) create mode 100644 examples/rust-multiple-bins/.gitignore create mode 100644 examples/rust-multiple-bins/Cargo.toml create mode 100644 examples/rust-multiple-bins/src/bin/bin1.rs create mode 100644 examples/rust-multiple-bins/src/bin/bin2.rs diff --git a/examples/rust-multiple-bins/.gitignore b/examples/rust-multiple-bins/.gitignore new file mode 100644 index 000000000..ea8c4bf7f --- /dev/null +++ b/examples/rust-multiple-bins/.gitignore @@ -0,0 +1 @@ +/target diff --git a/examples/rust-multiple-bins/Cargo.toml b/examples/rust-multiple-bins/Cargo.toml new file mode 100644 index 000000000..918d0a9d2 --- /dev/null +++ b/examples/rust-multiple-bins/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "rust-multiple-bins" +version = "0.1.0" +edition = "2021" +default-run = "bin1" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/examples/rust-multiple-bins/src/bin/bin1.rs b/examples/rust-multiple-bins/src/bin/bin1.rs new file mode 100644 index 000000000..09986650f --- /dev/null +++ b/examples/rust-multiple-bins/src/bin/bin1.rs @@ -0,0 +1,3 @@ +fn main() { + println!("This is Bin 1!"); +} diff --git a/examples/rust-multiple-bins/src/bin/bin2.rs b/examples/rust-multiple-bins/src/bin/bin2.rs new file mode 100644 index 000000000..fabecd833 --- /dev/null +++ b/examples/rust-multiple-bins/src/bin/bin2.rs @@ -0,0 +1,3 @@ +fn main() { + println!("This is Bin 2!"); +} diff --git a/test-helper/src/lib.rs b/test-helper/src/lib.rs index de7e5eb88..9bda8709c 100644 --- a/test-helper/src/lib.rs +++ b/test-helper/src/lib.rs @@ -13,6 +13,7 @@ const IGNORE: &[&str] = &[ "rust-custom-toolchain", "rust-cargo-workspaces", "rust-cargo-workspaces-glob", + "rust-multiple-bins", "ruby-no-version", ]; diff --git a/tests/docker_run_tests.rs b/tests/docker_run_tests.rs index e21914a7c..6dbb197ea 100644 --- a/tests/docker_run_tests.rs +++ b/tests/docker_run_tests.rs @@ -719,6 +719,13 @@ async fn test_rust_cargo_workspaces_glob() { assert!(output.contains("Hello from rust")); } +#[tokio::test] +async fn test_rust_multiple_bins() { + let name = simple_build("./examples/rust-multiple-bins").await; + let output = run_image(&name, None).await; + assert!(output.contains("Bin 1")); +} + #[tokio::test] async fn test_go() { let name = simple_build("./examples/go").await; From 0a5a85e60893348c544724181012725d6953af70 Mon Sep 17 00:00:00 2001 From: Jake Runzer Date: Fri, 3 Feb 2023 17:47:58 -0500 Subject: [PATCH 14/61] (cargo-release) version 1.2.0 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9e347ed48..fb4bbe30f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1009,7 +1009,7 @@ dependencies = [ [[package]] name = "nixpacks" -version = "1.1.1" +version = "1.2.0" dependencies = [ "actix-web", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index e2fc963a7..1b8bc7fbd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nixpacks" -version = "1.1.1" +version = "1.2.0" edition = "2021" license = "MIT" authors = ["Railway "] From 09680956405fe90d51ca7c1346040c0c1e6c7cd7 Mon Sep 17 00:00:00 2001 From: Mohammad Yousuf Minhaj Zia <42372397+yzia2000@users.noreply.github.com> Date: Sat, 4 Feb 2023 06:02:57 +0530 Subject: [PATCH 15/61] feat(scala): Added ScalaProvider (#782) * feat(scala): Added ScalaProvider The ScalaProvider adds support for the scala ecosystem, not covered by maven and gradle which includes sbt, mill and scala-cli. Added support for sbt projects. Fixes #714 * feat(scala): added docs for scala Docs for scala-sbt added * Update src/providers/scala.rs * lint and snapshot test * format and fix tests --------- Co-authored-by: Jake Runzer --- docs/pages/docs/providers/scala.md | 67 ++++++++++++ docs/sidebar.ts | 1 + examples/scala-sbt/.gitignore | 32 ++++++ examples/scala-sbt/build.sbt | 17 +++ examples/scala-sbt/project/build.properties | 1 + examples/scala-sbt/project/plugins.sbt | 1 + examples/scala-sbt/src/main/scala/Main.scala | 5 + src/lib.rs | 5 +- src/providers/mod.rs | 1 + src/providers/scala.rs | 102 ++++++++++++++++++ tests/docker_run_tests.rs | 7 ++ .../generate_plan_tests__scala_sbt.snap | 40 +++++++ 12 files changed, 277 insertions(+), 2 deletions(-) create mode 100644 docs/pages/docs/providers/scala.md create mode 100644 examples/scala-sbt/.gitignore create mode 100644 examples/scala-sbt/build.sbt create mode 100644 examples/scala-sbt/project/build.properties create mode 100644 examples/scala-sbt/project/plugins.sbt create mode 100644 examples/scala-sbt/src/main/scala/Main.scala create mode 100644 src/providers/scala.rs create mode 100644 tests/snapshots/generate_plan_tests__scala_sbt.snap diff --git a/docs/pages/docs/providers/scala.md b/docs/pages/docs/providers/scala.md new file mode 100644 index 000000000..e7bdbbb9e --- /dev/null +++ b/docs/pages/docs/providers/scala.md @@ -0,0 +1,67 @@ +--- +title: Scala +--- + +# {% $markdoc.frontmatter.title %} + +Currently sbt projects are supported for Scala. For gradle and maven support, please look +at Java. Scala is detected by `build.sbt` in project root. + +## SBT Setup + +### Requirements + +The project should contain the `sbt-native-packager` sbt plugin. This can be done +by adding the plugin to `project/plugins.sbt`. + +```scala +// Check https://github.com/sbt/sbt-native-packager for version +addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "x.x.x") +``` + +After that enable the `JavaAppPackaging` plugin in `build.sbt` and set the +`executableScriptName` to `main`. An example of the `build.sbt` can be seen here. + +```scala +val scala3Version = "3.2.2" + +lazy val root = project + .in(file(".")) + .settings( + name := "scala-sbt", + version := "0.1.0-SNAPSHOT", + + scalaVersion := scala3Version, + + // This is required by nixpacks + executableScriptName := "main" + ) + // sbt-native-packager is the tool used by nixpacks + // to generate the package + .enablePlugins(JavaAppPackaging) + +``` + +The `executableScriptName` is required for `nixpacks` to run the right executable +in the start command. + +### Build + +`sbt-native-package` is used for building the package. + +``` +sbt stage +``` + +This creates the required packages and also a convenient script to run +at `./target/universal/stage/bin/main` + +### Start + +Run the built script: + +```sh +./target/universal/stage/bin/main +``` + +The script picks up `JAVA_OPTS` to provide jvm or java arguments to the system. diff --git a/docs/sidebar.ts b/docs/sidebar.ts index d27a454e2..5dce544ec 100644 --- a/docs/sidebar.ts +++ b/docs/sidebar.ts @@ -51,6 +51,7 @@ export const sidebarItems: ISidebarSection[] = [ { href: "/docs/providers/rust", text: "Rust" }, { href: "/docs/providers/staticfile", text: "Staticfile" }, { href: "/docs/providers/swift", text: "Swift" }, + { href: "/docs/providers/scala", text: "Scala" }, { href: "/docs/providers/zig-lang", text: "Zig" }, ], }, diff --git a/examples/scala-sbt/.gitignore b/examples/scala-sbt/.gitignore new file mode 100644 index 000000000..9e79245ee --- /dev/null +++ b/examples/scala-sbt/.gitignore @@ -0,0 +1,32 @@ +# macOS +.DS_Store + +# sbt specific +dist/* +target/ +lib_managed/ +src_managed/ +project/boot/ +project/plugins/project/ +project/local-plugins.sbt +.history +.ensime +.ensime_cache/ +.sbt-scripted/ +local.sbt + +# Bloop +.bsp + +# VS Code +.vscode/ + +# Metals +.bloop/ +.metals/ +metals.sbt + +# IDEA +.idea +.idea_modules +/.worksheet/ diff --git a/examples/scala-sbt/build.sbt b/examples/scala-sbt/build.sbt new file mode 100644 index 000000000..a715f330c --- /dev/null +++ b/examples/scala-sbt/build.sbt @@ -0,0 +1,17 @@ +val scala3Version = "3.2.2" + +lazy val root = project + .in(file(".")) + .settings( + name := "scala-sbt", + version := "0.1.0-SNAPSHOT", + + scalaVersion := scala3Version, + + // This is required by nixpacks + executableScriptName := "main" + ) + // sbt-native-packager is the tool used by nixpacks + // to generate the package + .enablePlugins(JavaAppPackaging) + diff --git a/examples/scala-sbt/project/build.properties b/examples/scala-sbt/project/build.properties new file mode 100644 index 000000000..46e43a97e --- /dev/null +++ b/examples/scala-sbt/project/build.properties @@ -0,0 +1 @@ +sbt.version=1.8.2 diff --git a/examples/scala-sbt/project/plugins.sbt b/examples/scala-sbt/project/plugins.sbt new file mode 100644 index 000000000..18dadf32d --- /dev/null +++ b/examples/scala-sbt/project/plugins.sbt @@ -0,0 +1 @@ +addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.13") diff --git a/examples/scala-sbt/src/main/scala/Main.scala b/examples/scala-sbt/src/main/scala/Main.scala new file mode 100644 index 000000000..b51644b6e --- /dev/null +++ b/examples/scala-sbt/src/main/scala/Main.scala @@ -0,0 +1,5 @@ +@main def hello: Unit = + println("Hello world!") + println(msg) + +def msg = "I was compiled by Scala 3. :)" diff --git a/src/lib.rs b/src/lib.rs index d5ca93160..ce5fa59b3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,8 +38,8 @@ use providers::{ csharp::CSharpProvider, dart::DartProvider, deno::DenoProvider, elixir::ElixirProvider, fsharp::FSharpProvider, go::GolangProvider, haskell::HaskellStackProvider, java::JavaProvider, node::NodeProvider, php::PhpProvider, python::PythonProvider, ruby::RubyProvider, - rust::RustProvider, staticfile::StaticfileProvider, swift::SwiftProvider, zig::ZigProvider, - Provider, + rust::RustProvider, scala::ScalaProvider, staticfile::StaticfileProvider, swift::SwiftProvider, + zig::ZigProvider, Provider, }; mod chain; @@ -59,6 +59,7 @@ pub fn get_providers() -> &'static [&'static (dyn Provider)] { &GolangProvider {}, &HaskellStackProvider {}, &JavaProvider {}, + &ScalaProvider {}, &PhpProvider {}, &RubyProvider {}, &NodeProvider {}, diff --git a/src/providers/mod.rs b/src/providers/mod.rs index 629eba72c..01af32d70 100644 --- a/src/providers/mod.rs +++ b/src/providers/mod.rs @@ -18,6 +18,7 @@ pub mod procfile; pub mod python; pub mod ruby; pub mod rust; +pub mod scala; pub mod staticfile; pub mod swift; pub mod zig; diff --git a/src/providers/scala.rs b/src/providers/scala.rs new file mode 100644 index 000000000..e18b0a296 --- /dev/null +++ b/src/providers/scala.rs @@ -0,0 +1,102 @@ +use super::Provider; +use crate::nixpacks::{ + app::App, + environment::Environment, + nix::pkg::Pkg, + plan::{ + phase::{Phase, StartPhase}, + BuildPlan, + }, +}; +use anyhow::Result; + +pub struct ScalaProvider {} + +/** + * Scala provider currently supports sbt. + * - The sbt project requires sbt-native-packager, a popular packaging + * tool used by the community to package apps. Setting executableScriptName and + * enabling the JavaAppPackaging plugin are required. Please check examples/scala-sbt + * for an example. + * + * TODO: Add support for scala-cli and mill + */ +impl Provider for ScalaProvider { + fn name(&self) -> &str { + "scala" + } + + fn detect(&self, app: &App, _env: &Environment) -> Result { + Ok(app.includes_file("build.sbt")) + } + + fn get_build_plan(&self, app: &App, _env: &Environment) -> Result> { + if self.is_using_sbt(app) { + let pkgs = self.get_sbt_dep_pkgs(); + let setup = Phase::setup(Some(pkgs)); + + let mut build = Phase::build(None); + let sbt_exe = self.get_sbt_exe(); + + build.add_cmd(format!("{sbt_exe} stage")); + build.add_cache_directory("/root/.sbt"); + build.add_cache_directory("/root/.ivy2/cache"); + build.add_cache_directory("/root/.cache/coursier"); + build.depends_on_phase("setup"); + + let start_cmd = self.get_start_cmd(app).map(StartPhase::new); + + let plan = BuildPlan::new(&vec![setup, build], start_cmd); + Ok(Some(plan)) + } else { + Ok(None) + } + } +} + +impl ScalaProvider { + fn get_sbt_exe(&self) -> String { + "sbt".to_string() + } + + fn get_start_cmd(&self, app: &App) -> Option { + if self.is_using_sbt(app) { + Some("./target/universal/stage/bin/main".to_string()) + } else { + None + } + } + + fn is_using_sbt(&self, app: &App) -> bool { + app.includes_file("build.sbt") + } + + pub fn get_sbt_dep_pkgs(&self) -> Vec { + let pkgs = vec![self.get_sbt_pkg(), self.get_jdk_pkg()]; + pkgs + } + + fn get_sbt_pkg(&self) -> Pkg { + Pkg::new("sbt") + } + + fn get_jdk_pkg(&self) -> Pkg { + // sbt uses jdk pkg to compile and package the project + // already so we should use the same package for the start phase + // to prevent conflict. + Pkg::new("jdk") + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_sbt_package() { + let scala = ScalaProvider {}; + + assert!(scala.is_using_sbt(&App::new("examples/scala-sbt").unwrap())); + assert!(!scala.is_using_sbt(&App::new("examples/node").unwrap())); + } +} diff --git a/tests/docker_run_tests.rs b/tests/docker_run_tests.rs index 6dbb197ea..ddce9ddb9 100644 --- a/tests/docker_run_tests.rs +++ b/tests/docker_run_tests.rs @@ -815,6 +815,13 @@ async fn test_java_maven() { assert!(output.contains("Built with Spring Boot")); } +#[tokio::test] +async fn test_scala_sbt() { + let name = simple_build("./examples/scala-sbt").await; + let output = run_image(&name, None).await; + assert!(output.contains("I was compiled by Scala 3")); +} + #[tokio::test] async fn test_zig() { let name = simple_build("./examples/zig").await; diff --git a/tests/snapshots/generate_plan_tests__scala_sbt.snap b/tests/snapshots/generate_plan_tests__scala_sbt.snap new file mode 100644 index 000000000..9598e2a26 --- /dev/null +++ b/tests/snapshots/generate_plan_tests__scala_sbt.snap @@ -0,0 +1,40 @@ +--- +source: tests/generate_plan_tests.rs +expression: plan +--- +{ + "providers": [], + "buildImage": "[build_image]", + "variables": { + "NIXPACKS_METADATA": "scala" + }, + "phases": { + "build": { + "name": "build", + "dependsOn": [ + "install", + "setup" + ], + "cmds": [ + "sbt stage" + ], + "cacheDirectories": [ + "/root/.cache/coursier", + "/root/.ivy2/cache", + "/root/.sbt" + ] + }, + "setup": { + "name": "setup", + "nixPkgs": [ + "sbt", + "jdk" + ], + "nixOverlays": [], + "nixpkgsArchive": "[archive]" + } + }, + "start": { + "cmd": "./target/universal/stage/bin/main" + } +} From d5871c2ba7596b6056fd000984bfbdc5321e4a96 Mon Sep 17 00:00:00 2001 From: Jake Runzer Date: Fri, 3 Feb 2023 19:51:09 -0500 Subject: [PATCH 16/61] (cargo-release) version 1.3.0 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fb4bbe30f..db889268d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1009,7 +1009,7 @@ dependencies = [ [[package]] name = "nixpacks" -version = "1.2.0" +version = "1.3.0" dependencies = [ "actix-web", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 1b8bc7fbd..2e67550b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nixpacks" -version = "1.2.0" +version = "1.3.0" edition = "2021" license = "MIT" authors = ["Railway "] From a8ed54a94e8015969ad0b9369ab4adde523584b4 Mon Sep 17 00:00:00 2001 From: Jake Runzer Date: Fri, 3 Feb 2023 20:05:36 -0500 Subject: [PATCH 17/61] (cargo-release) version 1.3.1 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index db889268d..4479ad828 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1009,7 +1009,7 @@ dependencies = [ [[package]] name = "nixpacks" -version = "1.3.0" +version = "1.3.1" dependencies = [ "actix-web", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 2e67550b8..cb2192025 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nixpacks" -version = "1.3.0" +version = "1.3.1" edition = "2021" license = "MIT" authors = ["Railway "] From 37fd0b66f53492ce1c2f612fa46b6b3b069784e0 Mon Sep 17 00:00:00 2001 From: Railway Bot Date: Tue, 7 Feb 2023 04:05:20 -0800 Subject: [PATCH 18/61] Bump Debian base image to `debian-1675728305` (#783) Co-authored-by: coffee-cup --- src/nixpacks/images.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nixpacks/images.rs b/src/nixpacks/images.rs index fa696fa24..59a8d0ebd 100644 --- a/src/nixpacks/images.rs +++ b/src/nixpacks/images.rs @@ -1,4 +1,4 @@ -pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1675123546"; +pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1675728305"; pub const UBUNTU_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:ubuntu-1675123887"; pub const DEFAULT_BASE_IMAGE: &str = UBUNTU_BASE_IMAGE; From 4910c622f045bd3be9e2279331acb13f70de16b5 Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Thu, 9 Feb 2023 23:53:56 +0700 Subject: [PATCH 19/61] Update node.md (#785) --- docs/pages/docs/providers/node.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/pages/docs/providers/node.md b/docs/pages/docs/providers/node.md index dc28542ae..8d285bbee 100644 --- a/docs/pages/docs/providers/node.md +++ b/docs/pages/docs/providers/node.md @@ -41,7 +41,9 @@ All dependencies found in `package.json` are installed with either NPM, Yarn, PN ## Build -The build script found in `package.json` if it exists or if its an NX Monorepo `(npm|pnpm|yarn|bun) run build --configuration=production`. +The build script found in `package.json` if it exists. + +Or, if it's an NX Monorepo (detected if `nx.json` existis), the `build` pipeline for the `NIXPACKS_NX_APP_NAME` app will be called. Otherwise, it will run build for the `default_project` in `nx.json`. The build command is `(npm|pnpm|yarn|bun) run build :build:production`. Or, if it's a Turborepo monorepo (detected if `turbo.json` exists), the `build` pipeline will be called (if it exists). Otherwise, the `build` script of the `package.json` referenced by `NIXPACKS_TURBO_APP_NAME` will be called, if `NIXPACKS_TURBO_APP_NAME` is provided. Otherwise, it will fall back to the build script found in `package.json` at the monorepos root. @@ -50,6 +52,7 @@ Or, if it's a Turborepo monorepo (detected if `turbo.json` exists), the `build` The start command priority is - If its an NX Monorepo + - It will use `NIXPACKS_NX_APP_NAME` for the app name if provided, otherwise it will use the `default_project` from `nx.json` - If the app has a `start` target `npx nx run :start:production` or just `npx nx run :start` if no production configuration is present - If the app is a NextJS project: `npm run start` - If `targets.build.options.main` exists in the apps `Project.json`: `node /.js` (e.g `node dist/apps/my-app/main.js`) From b01714db8d033398b0d2f4b50d32a6dc8aa10e00 Mon Sep 17 00:00:00 2001 From: Milo <50248166+Milo123459@users.noreply.github.com> Date: Thu, 16 Feb 2023 19:18:11 +0000 Subject: [PATCH 20/61] Fix powershell permanent redirect (#799) --- docs/next.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/next.config.js b/docs/next.config.js index 5acc09c64..c3ab149a4 100644 --- a/docs/next.config.js +++ b/docs/next.config.js @@ -11,12 +11,12 @@ module.exports = source: "/install.sh", destination: "https://raw.githubusercontent.com/railwayapp/nixpacks/main/install.sh", - permanent: true, + permanent: false, }, { source: "/install.ps1", destination: "https://raw.githubusercontent.com/railwayapp/nixpacks/main/install.ps1", - permanent: true + permanent: false, } ]; }, From 9e0c2009721a4d94dddc90c4c735aef92275725c Mon Sep 17 00:00:00 2001 From: Jake Runzer Date: Thu, 16 Feb 2023 15:15:47 -0500 Subject: [PATCH 21/61] Rust: support top-level main bin (#787) * support top-level main bin * add multiple bns basic test * is_empty chekc --- examples/rust-multiple-bins/src/main.rs | 3 +++ src/providers/rust.rs | 17 +++++++++++------ tests/generate_plan_tests.rs | 8 ++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 examples/rust-multiple-bins/src/main.rs diff --git a/examples/rust-multiple-bins/src/main.rs b/examples/rust-multiple-bins/src/main.rs new file mode 100644 index 000000000..c4f5d83f6 --- /dev/null +++ b/examples/rust-multiple-bins/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("This is the main Bin!"); +} diff --git a/src/providers/rust.rs b/src/providers/rust.rs index 91e85b73b..90b673ec4 100644 --- a/src/providers/rust.rs +++ b/src/providers/rust.rs @@ -130,6 +130,13 @@ impl RustProvider { fn get_bins(app: &App) -> Result>> { let mut bins = vec![]; + // Support the main bin + if let Some(name) = RustProvider::get_app_name(app)? { + if app.includes_file("src/main.rs") { + bins.push(name); + } + } + if app.includes_directory("src/bin") { let find_bins = app.find_files("src/bin/*")?; @@ -146,15 +153,13 @@ impl RustProvider { bins.push(bin_name); } + } - return Ok(Some(bins)); - } else if let Some(name) = RustProvider::get_app_name(app)? { - bins.push(name); - - return Ok(Some(bins)); + if bins.is_empty() { + return Ok(None); } - Ok(None) + Ok(Some(bins)) } fn get_start(app: &App, env: &Environment) -> Result> { diff --git a/tests/generate_plan_tests.rs b/tests/generate_plan_tests.rs index 22e2ae3c4..b1ca034d4 100644 --- a/tests/generate_plan_tests.rs +++ b/tests/generate_plan_tests.rs @@ -84,6 +84,14 @@ fn test_rust_cargo_workspaces() { ); } +#[test] +fn test_rust_multiple_bins() { + let plan = simple_gen_plan("./examples/rust-multiple-bins"); + let build = plan.get_phase("build").unwrap(); + + assert_eq!(build.clone().cmds.unwrap().len(), 5); +} + #[test] fn test_haskell_stack() { let plan = simple_gen_plan("./examples/haskell-stack"); From 9ecc5ba7f95ea3b6bebdc6550b61682d4902f03d Mon Sep 17 00:00:00 2001 From: Milo <50248166+Milo123459@users.noreply.github.com> Date: Thu, 16 Feb 2023 20:16:16 +0000 Subject: [PATCH 22/61] Cache rust dependencies in test suite (#801) Co-authored-by: Jake Runzer --- .github/workflows/ci.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f87b33163..075abcd0f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -136,7 +136,15 @@ jobs: toolchain: stable override: true - - uses: Swatinem/rust-cache@v2 + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Run cargo test uses: actions-rs/cargo@v1 From 538e9ed6341c33fe9221b74c1476dd90ea6588f1 Mon Sep 17 00:00:00 2001 From: Milo <50248166+Milo123459@users.noreply.github.com> Date: Thu, 16 Feb 2023 20:18:26 +0000 Subject: [PATCH 23/61] Fix SDK version parsing (#795) --- src/providers/csharp.rs | 45 ++++++++++--------- .../generate_plan_tests__csharp_api.snap | 2 +- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/providers/csharp.rs b/src/providers/csharp.rs index 90fc0b6b5..d5c835f5a 100644 --- a/src/providers/csharp.rs +++ b/src/providers/csharp.rs @@ -72,28 +72,29 @@ impl Provider for CSharpProvider { impl CSharpProvider { fn get_sdk_version(app: &App, env: &Environment) -> Result { - // First check for an SDK version environment variable - if let Some(version) = env.get_config_variable("CSHARP_SDK_VERSION") { - if let Some((major, minor)) = &version[0..3].split_once('.') { - return Ok(format!("dotnet-sdk_{major}_{minor}")); - } - } - - // Then check for a global.json and see if we can get the sdk version from there - if app.includes_file("global.json") { + // Check if a version is specified in global.json + let global_json = if app.includes_file("global.json") { let global_json: CSharpGlobalJson = app.read_json("global.json")?; - - if let Some(sdk) = global_json.sdk { - if let Some(version) = sdk.version { - if let Some((major, minor)) = &version[0..3].split_once('.') { - return Ok(format!("dotnet-sdk_{major}_{minor}")); - } - } - } + global_json.sdk.and_then(|sdk| sdk.version) + } else { + None + }; + // Use environment variable then global_json then default to 6 + let version_string = env + .get_config_variable("CSHARP_SDK_VERSION") + .or(global_json) + .or(Some(String::from("6"))); + let version_number: u8 = version_string + .unwrap() + .split('.') + .next() + .unwrap() + .parse() + .unwrap_or(6); // split by '.', get first item, attempt to parse to u8, if not default to 6 + match version_number { + 6 => Ok("dotnet-sdk".to_string()), + _ => Ok(format!("dotnet-sdk_{version_number}")), } - - // Fall back to default sdk - Ok("dotnet-sdk".to_string()) } } @@ -119,7 +120,7 @@ mod test { #[test] fn test_global_json() -> Result<()> { - let expected_sdk_name = "dotnet-sdk_7_0"; + let expected_sdk_name = "dotnet-sdk_7"; assert_eq!( CSharpProvider::get_sdk_version( &App::new("./examples/csharp-api")?, @@ -133,7 +134,7 @@ mod test { #[test] fn test_version_from_environment_variable() -> Result<()> { - let expected_sdk_name = "dotnet-sdk_6_0"; + let expected_sdk_name = "dotnet-sdk"; assert_eq!( CSharpProvider::get_sdk_version( &App::new("./examples/csharp-cli")?, diff --git a/tests/snapshots/generate_plan_tests__csharp_api.snap b/tests/snapshots/generate_plan_tests__csharp_api.snap index 47c14ee3e..8346980d8 100644 --- a/tests/snapshots/generate_plan_tests__csharp_api.snap +++ b/tests/snapshots/generate_plan_tests__csharp_api.snap @@ -33,7 +33,7 @@ expression: plan "setup": { "name": "setup", "nixPkgs": [ - "dotnet-sdk_7_0" + "dotnet-sdk_7" ], "nixOverlays": [], "nixpkgsArchive": "[archive]" From 0015400abf02842ad6247c049ac047a56dd4ba97 Mon Sep 17 00:00:00 2001 From: Milo <50248166+Milo123459@users.noreply.github.com> Date: Thu, 16 Feb 2023 20:19:48 +0000 Subject: [PATCH 24/61] merge bump workflows (#796) --- .../{publish_debian.yml => publish.yml} | 31 +++++-- .github/workflows/publish_ubuntu.yml | 86 ------------------- 2 files changed, 24 insertions(+), 93 deletions(-) rename .github/workflows/{publish_debian.yml => publish.yml} (67%) delete mode 100644 .github/workflows/publish_ubuntu.yml diff --git a/.github/workflows/publish_debian.yml b/.github/workflows/publish.yml similarity index 67% rename from .github/workflows/publish_debian.yml rename to .github/workflows/publish.yml index 1bd60b675..84e9e4999 100644 --- a/.github/workflows/publish_debian.yml +++ b/.github/workflows/publish.yml @@ -3,17 +3,17 @@ on: branches: - main paths: - - 'base/debian/*' + - 'base/publish/*' pull_request: branches: - main paths: - - 'base/debian/*' + - 'base/publish/*' schedule: - cron: '0 0 * * 2' workflow_dispatch: -name: Publish Debian Base Images +name: Publish Debian & Ubuntu Base Images jobs: debian: @@ -46,7 +46,7 @@ jobs: id: date run: echo "::set-output name=date::$(date +%s)" - - name: Build and push + - name: Build and push [Debian] uses: docker/build-push-action@v4 with: context: base/debian @@ -54,10 +54,19 @@ jobs: push: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} tags: ghcr.io/railwayapp/nixpacks:debian, ghcr.io/railwayapp/nixpacks:latest, ghcr.io/railwayapp/nixpacks:debian-${{ steps.date.outputs.date }} + - name: Build and push [Ubuntu] + uses: docker/build-push-action@v4 + with: + context: base/ubuntu + platforms: linux/arm64, linux/amd64 + push: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} + tags: ghcr.io/railwayapp/nixpacks:ubuntu, ghcr.io/railwayapp/nixpacks:ubuntu-${{ steps.date.outputs.date }} + - name: Bump base image if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} run: | sed -i 's/nixpacks:debian-.*/nixpacks:debian-${{ steps.date.outputs.date }}";/g' src/nixpacks/images.rs + sed -i 's/nixpacks:ubuntu-.*/nixpacks:ubuntu-${{ steps.date.outputs.date }}";/g' src/nixpacks/images.rs - name: Create Pull Request if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} @@ -66,9 +75,9 @@ jobs: base: main token: ${{ secrets.COMMITTER_TOKEN }} commit-message: Bump base image - branch: debian-${{ steps.date.outputs.date }} + branch: publish-${{ steps.date.outputs.date }} delete-branch: true - title: Bump Debian base image to `debian-${{ steps.date.outputs.date }}` + title: Bump base images to `debian-${{ steps.date.outputs.date }}` labels: release/patch - name: Login to Docker Hub @@ -77,10 +86,18 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push to Docker Hub + - name: Build and push to Docker Hub [Debian] uses: docker/build-push-action@v4 with: context: base/debian platforms: linux/arm64, linux/amd64, linux/386 push: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} tags: railwayapp/nixpacks:debian, railwayapp/nixpacks:latest, railwayapp/nixpacks:debian-${{ steps.date.outputs.date }} + + - name: Build and push to Docker Hub [Ubuntu] + uses: docker/build-push-action@v4 + with: + context: base/ubuntu + platforms: linux/arm64, linux/amd64 + push: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} + tags: railwayapp/nixpacks:ubuntu, railwayapp/nixpacks:ubuntu-${{ steps.date.outputs.date }} \ No newline at end of file diff --git a/.github/workflows/publish_ubuntu.yml b/.github/workflows/publish_ubuntu.yml deleted file mode 100644 index 42c9ba93c..000000000 --- a/.github/workflows/publish_ubuntu.yml +++ /dev/null @@ -1,86 +0,0 @@ -on: - push: - branches: - - main - paths: - - 'base/ubuntu/*' - pull_request: - branches: - - main - paths: - - 'base/ubuntu/*' - schedule: - - cron: '0 0 * * 2' - workflow_dispatch: - -name: Publish Ubuntu Base Images - -jobs: - ubuntu: - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - packages: write - id-token: write - - steps: - - name: Checkout sources - uses: actions/checkout@v3 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Get current date - id: date - run: echo "::set-output name=date::$(date +%s)" - - - name: Build and push - uses: docker/build-push-action@v4 - with: - context: base/ubuntu - platforms: linux/arm64, linux/amd64 - push: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} - tags: ghcr.io/railwayapp/nixpacks:ubuntu, ghcr.io/railwayapp/nixpacks:ubuntu-${{ steps.date.outputs.date }} - - - name: Bump base image - if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} - run: | - sed -i 's/nixpacks:ubuntu-.*/nixpacks:ubuntu-${{ steps.date.outputs.date }}";/g' src/nixpacks/images.rs - - - name: Create Pull Request - if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} - uses: peter-evans/create-pull-request@v4 - with: - base: main - token: ${{ secrets.COMMITTER_TOKEN }} - commit-message: Bump base image - branch: ubuntu-${{ steps.date.outputs.date }} - delete-branch: true - title: Bump Ubuntu base image to `ubuntu-${{ steps.date.outputs.date }}` - labels: release/patch - - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push to Docker Hub - uses: docker/build-push-action@v4 - with: - context: base/ubuntu - platforms: linux/arm64, linux/amd64 - push: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} - tags: railwayapp/nixpacks:ubuntu, railwayapp/nixpacks:ubuntu-${{ steps.date.outputs.date }} From b4a5fabd4cee00f0de7193df1a7c1f348d92e334 Mon Sep 17 00:00:00 2001 From: Mohammad Yousuf Minhaj Zia <42372397+yzia2000@users.noreply.github.com> Date: Fri, 17 Feb 2023 01:54:48 +0530 Subject: [PATCH 25/61] feat(scala): reduced scala sbt image size (#789) Co-authored-by: Jake Runzer --- src/providers/scala.rs | 11 ++++++++--- tests/snapshots/generate_plan_tests__scala_sbt.snap | 6 +++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/providers/scala.rs b/src/providers/scala.rs index e18b0a296..07e31fa84 100644 --- a/src/providers/scala.rs +++ b/src/providers/scala.rs @@ -44,9 +44,14 @@ impl Provider for ScalaProvider { build.add_cache_directory("/root/.cache/coursier"); build.depends_on_phase("setup"); - let start_cmd = self.get_start_cmd(app).map(StartPhase::new); - - let plan = BuildPlan::new(&vec![setup, build], start_cmd); + let start_phase = self.get_start_cmd(app).map(StartPhase::new).map(|phase| { + let mut updated_phase = phase; + updated_phase.run_in_image("eclipse-temurin:17.0.5_8-jre-jammy".to_string()); + updated_phase.add_file_dependency("./target/universal"); + updated_phase + }); + + let plan = BuildPlan::new(&vec![setup, build], start_phase); Ok(Some(plan)) } else { Ok(None) diff --git a/tests/snapshots/generate_plan_tests__scala_sbt.snap b/tests/snapshots/generate_plan_tests__scala_sbt.snap index 9598e2a26..032c85403 100644 --- a/tests/snapshots/generate_plan_tests__scala_sbt.snap +++ b/tests/snapshots/generate_plan_tests__scala_sbt.snap @@ -35,6 +35,10 @@ expression: plan } }, "start": { - "cmd": "./target/universal/stage/bin/main" + "cmd": "./target/universal/stage/bin/main", + "runImage": "eclipse-temurin:17.0.5_8-jre-jammy", + "onlyIncludeFiles": [ + "./target/universal" + ] } } From 6eb5220d81c33b529305787a79dfb684ccb37ba1 Mon Sep 17 00:00:00 2001 From: Milo <50248166+Milo123459@users.noreply.github.com> Date: Thu, 16 Feb 2023 22:01:27 +0000 Subject: [PATCH 26/61] Support nested directories (#797) --- examples/nested/hello/sub/index.js | 1 + examples/nested/hello/sub/package.json | 12 +++++ src/lib.rs | 11 +++- src/nixpacks/plan/generator.rs | 30 +++++++---- src/nixpacks/plan/mod.rs | 2 +- tests/docker_run_tests.rs | 6 +++ .../generate_plan_tests__nested.snap | 54 +++++++++++++++++++ 7 files changed, 103 insertions(+), 13 deletions(-) create mode 100644 examples/nested/hello/sub/index.js create mode 100644 examples/nested/hello/sub/package.json create mode 100644 tests/snapshots/generate_plan_tests__nested.snap diff --git a/examples/nested/hello/sub/index.js b/examples/nested/hello/sub/index.js new file mode 100644 index 000000000..42f86a495 --- /dev/null +++ b/examples/nested/hello/sub/index.js @@ -0,0 +1 @@ +console.log("Nested directories!"); \ No newline at end of file diff --git a/examples/nested/hello/sub/package.json b/examples/nested/hello/sub/package.json new file mode 100644 index 000000000..8eb5cb730 --- /dev/null +++ b/examples/nested/hello/sub/package.json @@ -0,0 +1,12 @@ +{ + "name": "a", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC" +} diff --git a/src/lib.rs b/src/lib.rs index ce5fa59b3..3e47904fc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -83,7 +83,7 @@ pub fn generate_build_plan( let mut generator = NixpacksBuildPlanGenerator::new(get_providers(), options.clone()); let plan = generator.generate_plan(&app, &environment)?; - Ok(plan) + Ok(plan.0) } pub fn get_plan_providers( @@ -107,9 +107,16 @@ pub async fn create_docker_image( ) -> Result<()> { let app = App::new(path)?; let environment = Environment::from_envs(envs)?; + let orig_path = app.source.clone(); let mut generator = NixpacksBuildPlanGenerator::new(get_providers(), plan_options.clone()); - let plan = generator.generate_plan(&app, &environment)?; + let (plan, app) = generator.generate_plan(&app, &environment)?; + + if let Ok(subdir) = app.source.strip_prefix(orig_path) { + if subdir != std::path::Path::new("") { + println!("Using subdirectory \"{}\"", subdir.to_str().unwrap()); + } + } let logger = Logger::new(); let builder = DockerImageBuilder::new(logger, build_options.clone()); diff --git a/src/nixpacks/plan/generator.rs b/src/nixpacks/plan/generator.rs index b0080c384..b1838ca14 100644 --- a/src/nixpacks/plan/generator.rs +++ b/src/nixpacks/plan/generator.rs @@ -30,7 +30,7 @@ pub struct NixpacksBuildPlanGenerator<'a> { } impl<'a> PlanGenerator for NixpacksBuildPlanGenerator<'a> { - fn generate_plan(&mut self, app: &App, environment: &Environment) -> Result { + fn generate_plan(&mut self, app: &App, environment: &Environment) -> Result<(BuildPlan, App)> { // If the provider defines a build plan in the new format, use that let plan = self.get_build_plan(app, environment)?; @@ -54,32 +54,42 @@ impl NixpacksBuildPlanGenerator<'_> { } /// Get a build plan from the provider and by applying the config from the environment - fn get_build_plan(&self, app: &App, env: &Environment) -> Result { + fn get_build_plan(&self, app: &App, env: &Environment) -> Result<(BuildPlan, App)> { let plan_before_providers = self.get_plan_before_providers(app, env)?; // Add the variables from the nixpacks.toml to environment - let env = &Environment::append_variables( + let new_env = &Environment::append_variables( env, plan_before_providers.variables.clone().unwrap_or_default(), ); let provider_plan = - self.get_plan_from_providers(app, env, plan_before_providers.providers.clone())?; + self.get_plan_from_providers(app, new_env, plan_before_providers.providers.clone())?; let procfile_plan = (ProcfileProvider {}) - .get_build_plan(app, env)? + .get_build_plan(app, new_env)? .unwrap_or_default(); let mut plan = BuildPlan::merge_plans(&vec![provider_plan, procfile_plan, plan_before_providers]); - if !env.get_variable_names().is_empty() { - plan.add_variables(Environment::clone_variables(env)); + if !new_env.get_variable_names().is_empty() { + plan.add_variables(Environment::clone_variables(new_env)); } - plan.pin(env.is_config_variable_truthy("DEBIAN")); - - Ok(plan) + plan.pin(new_env.is_config_variable_truthy("DEBIAN")); + if plan.clone().phases.unwrap_or_default().is_empty() { + // try again in a subdir + let dir_count = app.paths.clone().iter().filter(|p| p.is_dir()).count(); + if dir_count == 1 { + // there is 1 sub dir, try and generate a plan from that + let paths = app.paths.clone(); + let new_dir = paths.iter().find(|p| p.is_dir()).unwrap(); + return self + .get_build_plan(&App::new(new_dir.display().to_string().as_str())?, env); + } + } + Ok((plan, app.clone())) } fn get_plan_before_providers(&self, app: &App, env: &Environment) -> Result { diff --git a/src/nixpacks/plan/mod.rs b/src/nixpacks/plan/mod.rs index 055df4656..1065ddd1d 100644 --- a/src/nixpacks/plan/mod.rs +++ b/src/nixpacks/plan/mod.rs @@ -21,7 +21,7 @@ mod topological_sort; mod utils; pub trait PlanGenerator { - fn generate_plan(&mut self, app: &App, environment: &Environment) -> Result; + fn generate_plan(&mut self, app: &App, environment: &Environment) -> Result<(BuildPlan, App)>; fn get_plan_providers(&self, app: &App, environment: &Environment) -> Result>; } diff --git a/tests/docker_run_tests.rs b/tests/docker_run_tests.rs index ddce9ddb9..b1e308ed3 100644 --- a/tests/docker_run_tests.rs +++ b/tests/docker_run_tests.rs @@ -1025,3 +1025,9 @@ async fn test_django_pipfile() { assert!(output.contains("Running migrations")); } + +#[tokio::test] +async fn test_nested_directory() { + let name = simple_build("./examples/nested").await; + assert!(run_image(&name, None).await.contains("Nested directories!")); +} diff --git a/tests/snapshots/generate_plan_tests__nested.snap b/tests/snapshots/generate_plan_tests__nested.snap new file mode 100644 index 000000000..d8ba8ed19 --- /dev/null +++ b/tests/snapshots/generate_plan_tests__nested.snap @@ -0,0 +1,54 @@ +--- +source: tests/generate_plan_tests.rs +expression: plan +--- +{ + "providers": [], + "buildImage": "[build_image]", + "variables": { + "CI": "true", + "NIXPACKS_METADATA": "node", + "NODE_ENV": "production", + "NPM_CONFIG_PRODUCTION": "false" + }, + "phases": { + "build": { + "name": "build", + "dependsOn": [ + "install" + ], + "cacheDirectories": [ + "node_modules/.cache" + ] + }, + "install": { + "name": "install", + "dependsOn": [ + "setup" + ], + "cmds": [ + "npm i" + ], + "cacheDirectories": [ + "/root/.npm" + ], + "paths": [ + "/app/node_modules/.bin" + ] + }, + "setup": { + "name": "setup", + "nixPkgs": [ + "nodejs-16_x", + "npm-8_x" + ], + "nixOverlays": [ + "https://github.com/railwayapp/nix-npm-overlay/archive/main.tar.gz" + ], + "nixpkgsArchive": "[archive]" + } + }, + "start": { + "cmd": "node index.js" + } +} From e0823a8c431cd1eb287b90f528cce18c5af1e5ae Mon Sep 17 00:00:00 2001 From: Jake Runzer Date: Thu, 16 Feb 2023 17:27:11 -0500 Subject: [PATCH 27/61] (cargo-release) version 1.4.0 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4479ad828..fda8160ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1009,7 +1009,7 @@ dependencies = [ [[package]] name = "nixpacks" -version = "1.3.1" +version = "1.4.0" dependencies = [ "actix-web", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index cb2192025..08ec571e7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nixpacks" -version = "1.3.1" +version = "1.4.0" edition = "2021" license = "MIT" authors = ["Railway "] From 15667c426fc8d84eb96a44a1f13ff835f47be249 Mon Sep 17 00:00:00 2001 From: Railway Bot Date: Wed, 22 Feb 2023 08:19:56 -0800 Subject: [PATCH 28/61] Bump base images to `debian-1676937802` (#806) Co-authored-by: Milo123459 Co-authored-by: Milo <50248166+Milo123459@users.noreply.github.com> --- .github/workflows/publish.yml | 2 +- src/nixpacks/images.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 84e9e4999..8295a4c07 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -77,7 +77,7 @@ jobs: commit-message: Bump base image branch: publish-${{ steps.date.outputs.date }} delete-branch: true - title: Bump base images to `debian-${{ steps.date.outputs.date }}` + title: Bump base images to `${{ steps.date.outputs.date }}` labels: release/patch - name: Login to Docker Hub diff --git a/src/nixpacks/images.rs b/src/nixpacks/images.rs index 59a8d0ebd..92ad9675b 100644 --- a/src/nixpacks/images.rs +++ b/src/nixpacks/images.rs @@ -1,5 +1,5 @@ -pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1675728305"; -pub const UBUNTU_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:ubuntu-1675123887"; +pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1676937802"; +pub const UBUNTU_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:ubuntu-1676937802"; pub const DEFAULT_BASE_IMAGE: &str = UBUNTU_BASE_IMAGE; pub const STANDALONE_IMAGE: &str = "ubuntu:jammy"; From f82a946765537004768a8003ac1021d5fa6db2a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Feb 2023 12:01:11 -0500 Subject: [PATCH 29/61] Bump mikepenz/release-changelog-builder-action from 3.6.0 to 3.6.1 (#805) Bumps [mikepenz/release-changelog-builder-action](https://github.com/mikepenz/release-changelog-builder-action) from 3.6.0 to 3.6.1. - [Release notes](https://github.com/mikepenz/release-changelog-builder-action/releases) - [Commits](https://github.com/mikepenz/release-changelog-builder-action/compare/v3.6.0...v3.6.1) --- updated-dependencies: - dependency-name: mikepenz/release-changelog-builder-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b9768c8fe..d88682245 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: - name: Build Changelog id: build_changelog - uses: mikepenz/release-changelog-builder-action@v3.6.0 + uses: mikepenz/release-changelog-builder-action@v3.6.1 with: configuration: ".github/changelog-configuration.json" env: From 1f5c5480f3906c61223a0590fc27643e8083eef0 Mon Sep 17 00:00:00 2001 From: Jacob Enders Date: Thu, 23 Feb 2023 12:02:03 -0500 Subject: [PATCH 30/61] added entrypoint to slim (#803) Co-authored-by: Jacob Enders <> --- src/nixpacks/builder/docker/dockerfile_generation.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nixpacks/builder/docker/dockerfile_generation.rs b/src/nixpacks/builder/docker/dockerfile_generation.rs index 02b96b36f..977bcad69 100644 --- a/src/nixpacks/builder/docker/dockerfile_generation.rs +++ b/src/nixpacks/builder/docker/dockerfile_generation.rs @@ -310,6 +310,7 @@ impl DockerfileGenerator for StartPhase { formatdoc! {" # start FROM {run_image} + ENTRYPOINT [\"/bin/bash\", \"-l\", \"-c\"] WORKDIR {APP_DIR} COPY --from=0 /etc/ssl/certs /etc/ssl/certs RUN true From 09123bb46b7e75a50b1cbe7e5a023e56c6dfffe4 Mon Sep 17 00:00:00 2001 From: Railway Bot Date: Tue, 28 Feb 2023 13:11:06 -0800 Subject: [PATCH 31/61] Bump base image (#812) Co-authored-by: Milo123459 --- src/nixpacks/images.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nixpacks/images.rs b/src/nixpacks/images.rs index 92ad9675b..3e9262ea4 100644 --- a/src/nixpacks/images.rs +++ b/src/nixpacks/images.rs @@ -1,5 +1,5 @@ -pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1676937802"; -pub const UBUNTU_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:ubuntu-1676937802"; +pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1677542600"; +pub const UBUNTU_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:ubuntu-1677542600"; pub const DEFAULT_BASE_IMAGE: &str = UBUNTU_BASE_IMAGE; pub const STANDALONE_IMAGE: &str = "ubuntu:jammy"; From 9d1b01c787aca0f2e91c5f70794aad7874316219 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Feb 2023 16:11:18 -0500 Subject: [PATCH 32/61] Bump mikepenz/release-changelog-builder-action from 3.6.1 to 3.7.0 (#811) Bumps [mikepenz/release-changelog-builder-action](https://github.com/mikepenz/release-changelog-builder-action) from 3.6.1 to 3.7.0. - [Release notes](https://github.com/mikepenz/release-changelog-builder-action/releases) - [Commits](https://github.com/mikepenz/release-changelog-builder-action/compare/v3.6.1...v3.7.0) --- updated-dependencies: - dependency-name: mikepenz/release-changelog-builder-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d88682245..3478de6b0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: - name: Build Changelog id: build_changelog - uses: mikepenz/release-changelog-builder-action@v3.6.1 + uses: mikepenz/release-changelog-builder-action@v3.7.0 with: configuration: ".github/changelog-configuration.json" env: From 9e219d4e513585302adf5fb4b4cdebf617f89463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleks=20R=C5=ABti=C5=86=C5=A1?= Date: Wed, 1 Mar 2023 13:38:46 -0500 Subject: [PATCH 33/61] Better Perl parameter syntax (#810) * Better Perl parameter syntax * Fix snapshot tests * Actually fix snapshots * Actually actually fix snapshots * Actually actually actually fix snapshots --- src/providers/php/transform-config.pl | 9 ++++----- tests/snapshots/generate_plan_tests__php_laravel.snap | 4 ++-- tests/snapshots/generate_plan_tests__php_vanilla.snap | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/providers/php/transform-config.pl b/src/providers/php/transform-config.pl index d0b6d0f59..56ac70e14 100755 --- a/src/providers/php/transform-config.pl +++ b/src/providers/php/transform-config.pl @@ -3,9 +3,7 @@ undef $/; sub if_stmt { - my $condition = $_[0]; - my $value = $_[1]; - my $else = $_[2]; + my ($condition, $value, $else) = $_; if($ENV{$condition} eq "yes") { return $value; @@ -15,7 +13,8 @@ sub if_stmt { } sub get_nix_path { - my $exe = $_[0]; + my ($exe) = $_; + my $path = `which $exe`; $path =~ s/\n//; my $storePath = `nix-store -q $path`; @@ -53,4 +52,4 @@ sub get_nix_path { close(FH); open(FH, '>', $outfile) or die "Could not write configuration file '$outfile' $!"; print FH $out; -close(FH); \ No newline at end of file +close(FH); diff --git a/tests/snapshots/generate_plan_tests__php_laravel.snap b/tests/snapshots/generate_plan_tests__php_laravel.snap index 9b09fd206..8ea11eaf2 100644 --- a/tests/snapshots/generate_plan_tests__php_laravel.snap +++ b/tests/snapshots/generate_plan_tests__php_laravel.snap @@ -13,7 +13,7 @@ expression: plan "staticAssets": { "nginx.template.conf": "worker_processes 5;\ndaemon off;\n\nworker_rlimit_nofile 8192;\n\nevents {\n worker_connections 4096; # Default: 1024\n}\n\nhttp {\n include $!{nginx}/conf/mime.types;\n index index.html index.htm index.php;\n\n default_type application/octet-stream;\n log_format main '$remote_addr - $remote_user [$time_local] $status '\n '\"$request\" $body_bytes_sent \"$http_referer\" '\n '\"$http_user_agent\" \"$http_x_forwarded_for\"';\n access_log /dev/stdout;\n error_log /dev/stdout;\n sendfile on;\n tcp_nopush on;\n server_names_hash_bucket_size 128; # this seems to be required for some vhosts\n\n server {\n listen ${PORT};\n listen [::]:${PORT};\n server_name localhost;\n\n $if(IS_LARAVEL) (\n root /app/public;\n ) else (\n root /app;\n )\n \n add_header X-Frame-Options \"SAMEORIGIN\";\n add_header X-Content-Type-Options \"nosniff\";\n \n index index.php;\n \n charset utf-8;\n \n $if(IS_LARAVEL) (\n location / {\n try_files $uri $uri/ /index.php?$query_string;\n }\n ) else ()\n \n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n \n $if(IS_LARAVEL) (\n error_page 404 /index.php;\n ) else ()\n \n location ~ \\.php$ {\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;\n include $!{nginx}/conf/fastcgi_params;\n include $!{nginx}/conf/fastcgi.conf;\n }\n \n location ~ /\\.(?!well-known).* {\n deny all;\n }\n }\n}", "php-fpm.conf": "[www]\nlisten = 127.0.0.1:9000\nuser = nobody\npm = dynamic\npm.max_children = 50\npm.min_spare_servers = 4\npm.max_spare_servers = 32\npm.start_servers = 18\nclear_env = no\n", - "transform-config.pl": "#!/usr/bin/env perl\n\nundef $/;\n\nsub if_stmt {\n my $condition = $_[0];\n my $value = $_[1];\n my $else = $_[2];\n\n if($ENV{$condition} eq \"yes\") {\n return $value;\n } else {\n return $else;\n }\n}\n\nsub get_nix_path {\n my $exe = $_[0];\n my $path = `which $exe`;\n $path =~ s/\\n//;\n my $storePath = `nix-store -q $path`;\n $storePath =~ s/\\n//;\n return $storePath;\n}\n\nif ($#ARGV != 1) {\n print STDERR \"Usage: $0 \\n\";\n exit 1;\n}\nmy $infile = $ARGV[0];\nmy $outfile = $ARGV[1];\nopen(FH, '<', $infile) or die \"Could not open configuration file '$infile' $!\";\nmy $out = '';\nwhile () {\n\n # If statements\n s{\n \\$if\\s*\\((\\w+)\\)\\s*\\(\n ([\\s\\S]*?)\n \\)\\s*else\\s*\\(\n ([\\s\\S]*?)\n \\)\n }{if_stmt($1, $2, $3)}egx;\n\n # Variables\n s/\\$\\{(\\w+)\\}/$ENV{$1}/eg;\n \n # Nix paths\n s/\\$\\!\\{(\\w+)\\}/get_nix_path($1)/eg;\n\n $out .= $_;\n}\nclose(FH);\nopen(FH, '>', $outfile) or die \"Could not write configuration file '$outfile' $!\";\nprint FH $out;\nclose(FH);" + "transform-config.pl": "#!/usr/bin/env perl\n\nundef $/;\n\nsub if_stmt {\n my ($condition, $value, $else) = $_;\n\n if($ENV{$condition} eq \"yes\") {\n return $value;\n } else {\n return $else;\n }\n}\n\nsub get_nix_path {\n my ($exe) = $_;\n \n my $path = `which $exe`;\n $path =~ s/\\n//;\n my $storePath = `nix-store -q $path`;\n $storePath =~ s/\\n//;\n return $storePath;\n}\n\nif ($#ARGV != 1) {\n print STDERR \"Usage: $0 \\n\";\n exit 1;\n}\nmy $infile = $ARGV[0];\nmy $outfile = $ARGV[1];\nopen(FH, '<', $infile) or die \"Could not open configuration file '$infile' $!\";\nmy $out = '';\nwhile () {\n\n # If statements\n s{\n \\$if\\s*\\((\\w+)\\)\\s*\\(\n ([\\s\\S]*?)\n \\)\\s*else\\s*\\(\n ([\\s\\S]*?)\n \\)\n }{if_stmt($1, $2, $3)}egx;\n\n # Variables\n s/\\$\\{(\\w+)\\}/$ENV{$1}/eg;\n \n # Nix paths\n s/\\$\\!\\{(\\w+)\\}/get_nix_path($1)/eg;\n\n $out .= $_;\n}\nclose(FH);\nopen(FH, '>', $outfile) or die \"Could not write configuration file '$outfile' $!\";\nprint FH $out;\nclose(FH);\n" }, "phases": { "build": { @@ -55,4 +55,4 @@ expression: plan "start": { "cmd": "([ -e /app/storage ] && chmod -R ugo+w /app/storage); perl /assets/transform-config.pl /assets/nginx.template.conf /nginx.conf && echo \"Server starting on port $PORT\" && (php-fpm -y /assets/php-fpm.conf & nginx -c /nginx.conf)" } -} +} \ No newline at end of file diff --git a/tests/snapshots/generate_plan_tests__php_vanilla.snap b/tests/snapshots/generate_plan_tests__php_vanilla.snap index b5d511653..57dc0d64d 100644 --- a/tests/snapshots/generate_plan_tests__php_vanilla.snap +++ b/tests/snapshots/generate_plan_tests__php_vanilla.snap @@ -12,7 +12,7 @@ expression: plan "staticAssets": { "nginx.template.conf": "worker_processes 5;\ndaemon off;\n\nworker_rlimit_nofile 8192;\n\nevents {\n worker_connections 4096; # Default: 1024\n}\n\nhttp {\n include $!{nginx}/conf/mime.types;\n index index.html index.htm index.php;\n\n default_type application/octet-stream;\n log_format main '$remote_addr - $remote_user [$time_local] $status '\n '\"$request\" $body_bytes_sent \"$http_referer\" '\n '\"$http_user_agent\" \"$http_x_forwarded_for\"';\n access_log /dev/stdout;\n error_log /dev/stdout;\n sendfile on;\n tcp_nopush on;\n server_names_hash_bucket_size 128; # this seems to be required for some vhosts\n\n server {\n listen ${PORT};\n listen [::]:${PORT};\n server_name localhost;\n\n $if(IS_LARAVEL) (\n root /app/public;\n ) else (\n root /app;\n )\n \n add_header X-Frame-Options \"SAMEORIGIN\";\n add_header X-Content-Type-Options \"nosniff\";\n \n index index.php;\n \n charset utf-8;\n \n $if(IS_LARAVEL) (\n location / {\n try_files $uri $uri/ /index.php?$query_string;\n }\n ) else ()\n \n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n \n $if(IS_LARAVEL) (\n error_page 404 /index.php;\n ) else ()\n \n location ~ \\.php$ {\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;\n include $!{nginx}/conf/fastcgi_params;\n include $!{nginx}/conf/fastcgi.conf;\n }\n \n location ~ /\\.(?!well-known).* {\n deny all;\n }\n }\n}", "php-fpm.conf": "[www]\nlisten = 127.0.0.1:9000\nuser = nobody\npm = dynamic\npm.max_children = 50\npm.min_spare_servers = 4\npm.max_spare_servers = 32\npm.start_servers = 18\nclear_env = no\n", - "transform-config.pl": "#!/usr/bin/env perl\n\nundef $/;\n\nsub if_stmt {\n my $condition = $_[0];\n my $value = $_[1];\n my $else = $_[2];\n\n if($ENV{$condition} eq \"yes\") {\n return $value;\n } else {\n return $else;\n }\n}\n\nsub get_nix_path {\n my $exe = $_[0];\n my $path = `which $exe`;\n $path =~ s/\\n//;\n my $storePath = `nix-store -q $path`;\n $storePath =~ s/\\n//;\n return $storePath;\n}\n\nif ($#ARGV != 1) {\n print STDERR \"Usage: $0 \\n\";\n exit 1;\n}\nmy $infile = $ARGV[0];\nmy $outfile = $ARGV[1];\nopen(FH, '<', $infile) or die \"Could not open configuration file '$infile' $!\";\nmy $out = '';\nwhile () {\n\n # If statements\n s{\n \\$if\\s*\\((\\w+)\\)\\s*\\(\n ([\\s\\S]*?)\n \\)\\s*else\\s*\\(\n ([\\s\\S]*?)\n \\)\n }{if_stmt($1, $2, $3)}egx;\n\n # Variables\n s/\\$\\{(\\w+)\\}/$ENV{$1}/eg;\n \n # Nix paths\n s/\\$\\!\\{(\\w+)\\}/get_nix_path($1)/eg;\n\n $out .= $_;\n}\nclose(FH);\nopen(FH, '>', $outfile) or die \"Could not write configuration file '$outfile' $!\";\nprint FH $out;\nclose(FH);" + "transform-config.pl": "#!/usr/bin/env perl\n\nundef $/;\n\nsub if_stmt {\n my ($condition, $value, $else) = $_;\n\n if($ENV{$condition} eq \"yes\") {\n return $value;\n } else {\n return $else;\n }\n}\n\nsub get_nix_path {\n my ($exe) = $_;\n \n my $path = `which $exe`;\n $path =~ s/\\n//;\n my $storePath = `nix-store -q $path`;\n $storePath =~ s/\\n//;\n return $storePath;\n}\n\nif ($#ARGV != 1) {\n print STDERR \"Usage: $0 \\n\";\n exit 1;\n}\nmy $infile = $ARGV[0];\nmy $outfile = $ARGV[1];\nopen(FH, '<', $infile) or die \"Could not open configuration file '$infile' $!\";\nmy $out = '';\nwhile () {\n\n # If statements\n s{\n \\$if\\s*\\((\\w+)\\)\\s*\\(\n ([\\s\\S]*?)\n \\)\\s*else\\s*\\(\n ([\\s\\S]*?)\n \\)\n }{if_stmt($1, $2, $3)}egx;\n\n # Variables\n s/\\$\\{(\\w+)\\}/$ENV{$1}/eg;\n \n # Nix paths\n s/\\$\\!\\{(\\w+)\\}/get_nix_path($1)/eg;\n\n $out .= $_;\n}\nclose(FH);\nopen(FH, '>', $outfile) or die \"Could not write configuration file '$outfile' $!\";\nprint FH $out;\nclose(FH);\n" }, "phases": { "install": { @@ -39,4 +39,4 @@ expression: plan "start": { "cmd": "([ -e /app/storage ] && chmod -R ugo+w /app/storage); perl /assets/transform-config.pl /assets/nginx.template.conf /nginx.conf && echo \"Server starting on port $PORT\" && (php-fpm -y /assets/php-fpm.conf & nginx -c /nginx.conf)" } -} +} \ No newline at end of file From 6f901e0066d137dee9812eede7bfa39339bea390 Mon Sep 17 00:00:00 2001 From: Mohammad Yousuf Minhaj Zia <42372397+yzia2000@users.noreply.github.com> Date: Thu, 2 Mar 2023 08:28:52 +0530 Subject: [PATCH 34/61] feat(scala): added NIXPACKS_JDK_VERSION env (#804) NIXPACKS_JDK_VERSION dictates the jdk version used for compiling the scala project as well as the lean image that runs compiled application. Default version is 17. Fixes #793 --- docs/pages/docs/providers/scala.md | 11 ++++ src/providers/scala.rs | 58 +++++++++++++++---- .../generate_plan_tests__scala_sbt.snap | 3 +- 3 files changed, 58 insertions(+), 14 deletions(-) diff --git a/docs/pages/docs/providers/scala.md b/docs/pages/docs/providers/scala.md index e7bdbbb9e..663cb6fa9 100644 --- a/docs/pages/docs/providers/scala.md +++ b/docs/pages/docs/providers/scala.md @@ -9,6 +9,17 @@ at Java. Scala is detected by `build.sbt` in project root. ## SBT Setup +### JDK + +The following major JDK versions are available + +- `19` +- `17` (Default) +- `11` +- `8` + +The version can be overridden by setting the `NIXPACKS_JDK_VERSION` environment variable. + ### Requirements The project should contain the `sbt-native-packager` sbt plugin. This can be done diff --git a/src/providers/scala.rs b/src/providers/scala.rs index 07e31fa84..3b4db8f0d 100644 --- a/src/providers/scala.rs +++ b/src/providers/scala.rs @@ -12,6 +12,8 @@ use anyhow::Result; pub struct ScalaProvider {} +const DEFAULT_JDK_VERSION: u32 = 17; + /** * Scala provider currently supports sbt. * - The sbt project requires sbt-native-packager, a popular packaging @@ -30,9 +32,11 @@ impl Provider for ScalaProvider { Ok(app.includes_file("build.sbt")) } - fn get_build_plan(&self, app: &App, _env: &Environment) -> Result> { + fn get_build_plan(&self, app: &App, env: &Environment) -> Result> { if self.is_using_sbt(app) { - let pkgs = self.get_sbt_dep_pkgs(); + let jdk_version: u32 = self.get_jdk_version(env); + + let pkgs = self.get_sbt_dep_pkgs(jdk_version); let setup = Phase::setup(Some(pkgs)); let mut build = Phase::build(None); @@ -46,7 +50,7 @@ impl Provider for ScalaProvider { let start_phase = self.get_start_cmd(app).map(StartPhase::new).map(|phase| { let mut updated_phase = phase; - updated_phase.run_in_image("eclipse-temurin:17.0.5_8-jre-jammy".to_string()); + updated_phase.run_in_image(self.get_jdk_run_image(jdk_version).to_string()); updated_phase.add_file_dependency("./target/universal"); updated_phase }); @@ -72,24 +76,46 @@ impl ScalaProvider { } } + fn get_jdk_pkg_name(&self, jdk_version: u32) -> &str { + match jdk_version { + 19 => "jdk", + 11 => "jdk11", + 8 => "jdk8", + + // Using 17 as default because its the latest LTS + _ => "jdk17", + } + } + + fn get_jdk_run_image(&self, jdk_version: u32) -> &str { + match jdk_version { + 19 => "eclipse-temurin:19.0.2_7-jre-jammy", + 11 => "eclipse-temurin:11.0.18_10-jre-jammy", + 8 => "eclipse-temurin:8u362-b09-jre-jammy", + + // Using 17 as default because its the latest LTS + _ => "eclipse-temurin:17.0.5_8-jre-jammy", + } + } + fn is_using_sbt(&self, app: &App) -> bool { app.includes_file("build.sbt") } - pub fn get_sbt_dep_pkgs(&self) -> Vec { - let pkgs = vec![self.get_sbt_pkg(), self.get_jdk_pkg()]; + pub fn get_sbt_dep_pkgs(&self, jdk_version: u32) -> Vec { + let pkgs = vec![self.get_sbt_pkg(jdk_version)]; pkgs } - fn get_sbt_pkg(&self) -> Pkg { - Pkg::new("sbt") + pub fn get_jdk_version(&self, env: &Environment) -> u32 { + env.get_config_variable("JDK_VERSION") + .map_or(DEFAULT_JDK_VERSION, |env_string| { + env_string.parse::().unwrap() + }) } - fn get_jdk_pkg(&self) -> Pkg { - // sbt uses jdk pkg to compile and package the project - // already so we should use the same package for the start phase - // to prevent conflict. - Pkg::new("jdk") + fn get_sbt_pkg(&self, jdk_version: u32) -> Pkg { + Pkg::new("sbt").set_override("jre", self.get_jdk_pkg_name(jdk_version)) } } @@ -103,5 +129,13 @@ mod tests { assert!(scala.is_using_sbt(&App::new("examples/scala-sbt").unwrap())); assert!(!scala.is_using_sbt(&App::new("examples/node").unwrap())); + assert_eq!( + Pkg::new("sbt").set_override("jre", "jdk8"), + scala.get_sbt_pkg( + scala.get_jdk_version( + &Environment::from_envs(vec!["NIXPACKS_JDK_VERSION=8"]).unwrap(), + ) + ) + ); } } diff --git a/tests/snapshots/generate_plan_tests__scala_sbt.snap b/tests/snapshots/generate_plan_tests__scala_sbt.snap index 032c85403..44f9a9f05 100644 --- a/tests/snapshots/generate_plan_tests__scala_sbt.snap +++ b/tests/snapshots/generate_plan_tests__scala_sbt.snap @@ -27,8 +27,7 @@ expression: plan "setup": { "name": "setup", "nixPkgs": [ - "sbt", - "jdk" + "(sbt.override { jre = jdk17; })" ], "nixOverlays": [], "nixpkgsArchive": "[archive]" From 308f9e326446d62a7d6584aef4135e1ac85a0528 Mon Sep 17 00:00:00 2001 From: Jake Runzer Date: Thu, 2 Mar 2023 14:09:24 -0500 Subject: [PATCH 35/61] (cargo-release) version 1.4.1 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fda8160ff..9d2671753 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1009,7 +1009,7 @@ dependencies = [ [[package]] name = "nixpacks" -version = "1.4.0" +version = "1.4.1" dependencies = [ "actix-web", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 08ec571e7..05bebb099 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nixpacks" -version = "1.4.0" +version = "1.4.1" edition = "2021" license = "MIT" authors = ["Railway "] From 60b1238c8932fe8d49e587ba7c99b0256f3e44fe Mon Sep 17 00:00:00 2001 From: Jake Runzer Date: Sat, 4 Mar 2023 16:12:24 -0500 Subject: [PATCH 36/61] fix php provider (#820) * fix php provider * php vanilla docker run test * fix snapshot tests --- src/providers/php/transform-config.pl | 2 +- tests/docker_run_tests.rs | 7 +++++++ tests/snapshots/generate_plan_tests__php_laravel.snap | 4 ++-- tests/snapshots/generate_plan_tests__php_vanilla.snap | 4 ++-- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/providers/php/transform-config.pl b/src/providers/php/transform-config.pl index 56ac70e14..1eeb830a8 100755 --- a/src/providers/php/transform-config.pl +++ b/src/providers/php/transform-config.pl @@ -13,7 +13,7 @@ sub if_stmt { } sub get_nix_path { - my ($exe) = $_; + my ($exe) = $_[0]; my $path = `which $exe`; $path =~ s/\n//; diff --git a/tests/docker_run_tests.rs b/tests/docker_run_tests.rs index b1e308ed3..80cce127e 100644 --- a/tests/docker_run_tests.rs +++ b/tests/docker_run_tests.rs @@ -815,6 +815,13 @@ async fn test_java_maven() { assert!(output.contains("Built with Spring Boot")); } +#[tokio::test] +async fn test_php_vanilla() { + let name = simple_build("./examples/php-vanilla").await; + let output = run_image(&name, None).await; + assert!(output.contains("Server starting on port 80")); +} + #[tokio::test] async fn test_scala_sbt() { let name = simple_build("./examples/scala-sbt").await; diff --git a/tests/snapshots/generate_plan_tests__php_laravel.snap b/tests/snapshots/generate_plan_tests__php_laravel.snap index 8ea11eaf2..af32ec3fc 100644 --- a/tests/snapshots/generate_plan_tests__php_laravel.snap +++ b/tests/snapshots/generate_plan_tests__php_laravel.snap @@ -13,7 +13,7 @@ expression: plan "staticAssets": { "nginx.template.conf": "worker_processes 5;\ndaemon off;\n\nworker_rlimit_nofile 8192;\n\nevents {\n worker_connections 4096; # Default: 1024\n}\n\nhttp {\n include $!{nginx}/conf/mime.types;\n index index.html index.htm index.php;\n\n default_type application/octet-stream;\n log_format main '$remote_addr - $remote_user [$time_local] $status '\n '\"$request\" $body_bytes_sent \"$http_referer\" '\n '\"$http_user_agent\" \"$http_x_forwarded_for\"';\n access_log /dev/stdout;\n error_log /dev/stdout;\n sendfile on;\n tcp_nopush on;\n server_names_hash_bucket_size 128; # this seems to be required for some vhosts\n\n server {\n listen ${PORT};\n listen [::]:${PORT};\n server_name localhost;\n\n $if(IS_LARAVEL) (\n root /app/public;\n ) else (\n root /app;\n )\n \n add_header X-Frame-Options \"SAMEORIGIN\";\n add_header X-Content-Type-Options \"nosniff\";\n \n index index.php;\n \n charset utf-8;\n \n $if(IS_LARAVEL) (\n location / {\n try_files $uri $uri/ /index.php?$query_string;\n }\n ) else ()\n \n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n \n $if(IS_LARAVEL) (\n error_page 404 /index.php;\n ) else ()\n \n location ~ \\.php$ {\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;\n include $!{nginx}/conf/fastcgi_params;\n include $!{nginx}/conf/fastcgi.conf;\n }\n \n location ~ /\\.(?!well-known).* {\n deny all;\n }\n }\n}", "php-fpm.conf": "[www]\nlisten = 127.0.0.1:9000\nuser = nobody\npm = dynamic\npm.max_children = 50\npm.min_spare_servers = 4\npm.max_spare_servers = 32\npm.start_servers = 18\nclear_env = no\n", - "transform-config.pl": "#!/usr/bin/env perl\n\nundef $/;\n\nsub if_stmt {\n my ($condition, $value, $else) = $_;\n\n if($ENV{$condition} eq \"yes\") {\n return $value;\n } else {\n return $else;\n }\n}\n\nsub get_nix_path {\n my ($exe) = $_;\n \n my $path = `which $exe`;\n $path =~ s/\\n//;\n my $storePath = `nix-store -q $path`;\n $storePath =~ s/\\n//;\n return $storePath;\n}\n\nif ($#ARGV != 1) {\n print STDERR \"Usage: $0 \\n\";\n exit 1;\n}\nmy $infile = $ARGV[0];\nmy $outfile = $ARGV[1];\nopen(FH, '<', $infile) or die \"Could not open configuration file '$infile' $!\";\nmy $out = '';\nwhile () {\n\n # If statements\n s{\n \\$if\\s*\\((\\w+)\\)\\s*\\(\n ([\\s\\S]*?)\n \\)\\s*else\\s*\\(\n ([\\s\\S]*?)\n \\)\n }{if_stmt($1, $2, $3)}egx;\n\n # Variables\n s/\\$\\{(\\w+)\\}/$ENV{$1}/eg;\n \n # Nix paths\n s/\\$\\!\\{(\\w+)\\}/get_nix_path($1)/eg;\n\n $out .= $_;\n}\nclose(FH);\nopen(FH, '>', $outfile) or die \"Could not write configuration file '$outfile' $!\";\nprint FH $out;\nclose(FH);\n" + "transform-config.pl": "#!/usr/bin/env perl\n\nundef $/;\n\nsub if_stmt {\n my ($condition, $value, $else) = $_;\n\n if($ENV{$condition} eq \"yes\") {\n return $value;\n } else {\n return $else;\n }\n}\n\nsub get_nix_path {\n my ($exe) = $_[0];\n \n my $path = `which $exe`;\n $path =~ s/\\n//;\n my $storePath = `nix-store -q $path`;\n $storePath =~ s/\\n//;\n return $storePath;\n}\n\nif ($#ARGV != 1) {\n print STDERR \"Usage: $0 \\n\";\n exit 1;\n}\nmy $infile = $ARGV[0];\nmy $outfile = $ARGV[1];\nopen(FH, '<', $infile) or die \"Could not open configuration file '$infile' $!\";\nmy $out = '';\nwhile () {\n\n # If statements\n s{\n \\$if\\s*\\((\\w+)\\)\\s*\\(\n ([\\s\\S]*?)\n \\)\\s*else\\s*\\(\n ([\\s\\S]*?)\n \\)\n }{if_stmt($1, $2, $3)}egx;\n\n # Variables\n s/\\$\\{(\\w+)\\}/$ENV{$1}/eg;\n \n # Nix paths\n s/\\$\\!\\{(\\w+)\\}/get_nix_path($1)/eg;\n\n $out .= $_;\n}\nclose(FH);\nopen(FH, '>', $outfile) or die \"Could not write configuration file '$outfile' $!\";\nprint FH $out;\nclose(FH);\n" }, "phases": { "build": { @@ -55,4 +55,4 @@ expression: plan "start": { "cmd": "([ -e /app/storage ] && chmod -R ugo+w /app/storage); perl /assets/transform-config.pl /assets/nginx.template.conf /nginx.conf && echo \"Server starting on port $PORT\" && (php-fpm -y /assets/php-fpm.conf & nginx -c /nginx.conf)" } -} \ No newline at end of file +} diff --git a/tests/snapshots/generate_plan_tests__php_vanilla.snap b/tests/snapshots/generate_plan_tests__php_vanilla.snap index 57dc0d64d..0c5c022ee 100644 --- a/tests/snapshots/generate_plan_tests__php_vanilla.snap +++ b/tests/snapshots/generate_plan_tests__php_vanilla.snap @@ -12,7 +12,7 @@ expression: plan "staticAssets": { "nginx.template.conf": "worker_processes 5;\ndaemon off;\n\nworker_rlimit_nofile 8192;\n\nevents {\n worker_connections 4096; # Default: 1024\n}\n\nhttp {\n include $!{nginx}/conf/mime.types;\n index index.html index.htm index.php;\n\n default_type application/octet-stream;\n log_format main '$remote_addr - $remote_user [$time_local] $status '\n '\"$request\" $body_bytes_sent \"$http_referer\" '\n '\"$http_user_agent\" \"$http_x_forwarded_for\"';\n access_log /dev/stdout;\n error_log /dev/stdout;\n sendfile on;\n tcp_nopush on;\n server_names_hash_bucket_size 128; # this seems to be required for some vhosts\n\n server {\n listen ${PORT};\n listen [::]:${PORT};\n server_name localhost;\n\n $if(IS_LARAVEL) (\n root /app/public;\n ) else (\n root /app;\n )\n \n add_header X-Frame-Options \"SAMEORIGIN\";\n add_header X-Content-Type-Options \"nosniff\";\n \n index index.php;\n \n charset utf-8;\n \n $if(IS_LARAVEL) (\n location / {\n try_files $uri $uri/ /index.php?$query_string;\n }\n ) else ()\n \n location = /favicon.ico { access_log off; log_not_found off; }\n location = /robots.txt { access_log off; log_not_found off; }\n \n $if(IS_LARAVEL) (\n error_page 404 /index.php;\n ) else ()\n \n location ~ \\.php$ {\n fastcgi_pass 127.0.0.1:9000;\n fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;\n include $!{nginx}/conf/fastcgi_params;\n include $!{nginx}/conf/fastcgi.conf;\n }\n \n location ~ /\\.(?!well-known).* {\n deny all;\n }\n }\n}", "php-fpm.conf": "[www]\nlisten = 127.0.0.1:9000\nuser = nobody\npm = dynamic\npm.max_children = 50\npm.min_spare_servers = 4\npm.max_spare_servers = 32\npm.start_servers = 18\nclear_env = no\n", - "transform-config.pl": "#!/usr/bin/env perl\n\nundef $/;\n\nsub if_stmt {\n my ($condition, $value, $else) = $_;\n\n if($ENV{$condition} eq \"yes\") {\n return $value;\n } else {\n return $else;\n }\n}\n\nsub get_nix_path {\n my ($exe) = $_;\n \n my $path = `which $exe`;\n $path =~ s/\\n//;\n my $storePath = `nix-store -q $path`;\n $storePath =~ s/\\n//;\n return $storePath;\n}\n\nif ($#ARGV != 1) {\n print STDERR \"Usage: $0 \\n\";\n exit 1;\n}\nmy $infile = $ARGV[0];\nmy $outfile = $ARGV[1];\nopen(FH, '<', $infile) or die \"Could not open configuration file '$infile' $!\";\nmy $out = '';\nwhile () {\n\n # If statements\n s{\n \\$if\\s*\\((\\w+)\\)\\s*\\(\n ([\\s\\S]*?)\n \\)\\s*else\\s*\\(\n ([\\s\\S]*?)\n \\)\n }{if_stmt($1, $2, $3)}egx;\n\n # Variables\n s/\\$\\{(\\w+)\\}/$ENV{$1}/eg;\n \n # Nix paths\n s/\\$\\!\\{(\\w+)\\}/get_nix_path($1)/eg;\n\n $out .= $_;\n}\nclose(FH);\nopen(FH, '>', $outfile) or die \"Could not write configuration file '$outfile' $!\";\nprint FH $out;\nclose(FH);\n" + "transform-config.pl": "#!/usr/bin/env perl\n\nundef $/;\n\nsub if_stmt {\n my ($condition, $value, $else) = $_;\n\n if($ENV{$condition} eq \"yes\") {\n return $value;\n } else {\n return $else;\n }\n}\n\nsub get_nix_path {\n my ($exe) = $_[0];\n \n my $path = `which $exe`;\n $path =~ s/\\n//;\n my $storePath = `nix-store -q $path`;\n $storePath =~ s/\\n//;\n return $storePath;\n}\n\nif ($#ARGV != 1) {\n print STDERR \"Usage: $0 \\n\";\n exit 1;\n}\nmy $infile = $ARGV[0];\nmy $outfile = $ARGV[1];\nopen(FH, '<', $infile) or die \"Could not open configuration file '$infile' $!\";\nmy $out = '';\nwhile () {\n\n # If statements\n s{\n \\$if\\s*\\((\\w+)\\)\\s*\\(\n ([\\s\\S]*?)\n \\)\\s*else\\s*\\(\n ([\\s\\S]*?)\n \\)\n }{if_stmt($1, $2, $3)}egx;\n\n # Variables\n s/\\$\\{(\\w+)\\}/$ENV{$1}/eg;\n \n # Nix paths\n s/\\$\\!\\{(\\w+)\\}/get_nix_path($1)/eg;\n\n $out .= $_;\n}\nclose(FH);\nopen(FH, '>', $outfile) or die \"Could not write configuration file '$outfile' $!\";\nprint FH $out;\nclose(FH);\n" }, "phases": { "install": { @@ -39,4 +39,4 @@ expression: plan "start": { "cmd": "([ -e /app/storage ] && chmod -R ugo+w /app/storage); perl /assets/transform-config.pl /assets/nginx.template.conf /nginx.conf && echo \"Server starting on port $PORT\" && (php-fpm -y /assets/php-fpm.conf & nginx -c /nginx.conf)" } -} \ No newline at end of file +} From ec545bbd725d6c2a6cab9031d22e60bc798178f3 Mon Sep 17 00:00:00 2001 From: Jake Runzer Date: Sat, 4 Mar 2023 16:12:41 -0500 Subject: [PATCH 37/61] (cargo-release) version 1.4.2 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9d2671753..d8fd51b07 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1009,7 +1009,7 @@ dependencies = [ [[package]] name = "nixpacks" -version = "1.4.1" +version = "1.4.2" dependencies = [ "actix-web", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 05bebb099..189f06951 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nixpacks" -version = "1.4.1" +version = "1.4.2" edition = "2021" license = "MIT" authors = ["Railway "] From b61191325b12eb3b397c381c37aaf28ebf9bb643 Mon Sep 17 00:00:00 2001 From: Railway Bot Date: Thu, 9 Mar 2023 12:52:01 -0500 Subject: [PATCH 38/61] Bump base images to `1678147396` (#822) Co-authored-by: Milo123459 --- src/nixpacks/images.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nixpacks/images.rs b/src/nixpacks/images.rs index 3e9262ea4..40badb043 100644 --- a/src/nixpacks/images.rs +++ b/src/nixpacks/images.rs @@ -1,5 +1,5 @@ -pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1677542600"; -pub const UBUNTU_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:ubuntu-1677542600"; +pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1678147396"; +pub const UBUNTU_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:ubuntu-1678147396"; pub const DEFAULT_BASE_IMAGE: &str = UBUNTU_BASE_IMAGE; pub const STANDALONE_IMAGE: &str = "ubuntu:jammy"; From 884ce2b1b6150fa55e8a1a4248caf2ef5de16a26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleks=20R=C5=ABti=C5=86=C5=A1?= Date: Thu, 9 Mar 2023 13:15:48 -0500 Subject: [PATCH 39/61] Fixing the PHP provider once and for all (#821) Co-authored-by: Jackson --- .gitignore | 1 + docs/pages/docs/providers/php.md | 9 +- .../php-custom-config/nginx.template.conf | 51 + examples/php-custom-config/stuff/index.php | 41 + .../php-laravel-ext-mongodb/.editorconfig | 18 + examples/php-laravel-ext-mongodb/.env | 52 + examples/php-laravel-ext-mongodb/.env.example | 52 + .../php-laravel-ext-mongodb/.gitattributes | 10 + examples/php-laravel-ext-mongodb/.gitignore | 13 + examples/php-laravel-ext-mongodb/.styleci.yml | 12 + examples/php-laravel-ext-mongodb/README.md | 64 + .../app/Console/Kernel.php | 32 + .../app/Exceptions/Handler.php | 50 + .../app/Http/Controllers/Controller.php | 13 + .../app/Http/Kernel.php | 67 + .../app/Http/Middleware/Authenticate.php | 21 + .../app/Http/Middleware/EncryptCookies.php | 17 + .../PreventRequestsDuringMaintenance.php | 17 + .../Middleware/RedirectIfAuthenticated.php | 32 + .../app/Http/Middleware/TrimStrings.php | 19 + .../app/Http/Middleware/TrustHosts.php | 20 + .../app/Http/Middleware/TrustProxies.php | 28 + .../app/Http/Middleware/VerifyCsrfToken.php | 17 + .../app/Models/User.php | 44 + .../app/Providers/AppServiceProvider.php | 28 + .../app/Providers/AuthServiceProvider.php | 30 + .../Providers/BroadcastServiceProvider.php | 21 + .../app/Providers/EventServiceProvider.php | 42 + .../app/Providers/RouteServiceProvider.php | 52 + examples/php-laravel-ext-mongodb/artisan | 53 + .../php-laravel-ext-mongodb/bootstrap/app.php | 55 + .../bootstrap/cache/.gitignore | 2 + .../php-laravel-ext-mongodb/composer.json | 62 + .../php-laravel-ext-mongodb/composer.lock | 7771 +++++++++++++++++ .../php-laravel-ext-mongodb/config/app.php | 215 + .../php-laravel-ext-mongodb/config/auth.php | 111 + .../config/broadcasting.php | 70 + .../php-laravel-ext-mongodb/config/cache.php | 110 + .../php-laravel-ext-mongodb/config/cors.php | 34 + .../config/database.php | 151 + .../config/filesystems.php | 76 + .../config/hashing.php | 52 + .../config/logging.php | 122 + .../php-laravel-ext-mongodb/config/mail.php | 118 + .../php-laravel-ext-mongodb/config/queue.php | 93 + .../config/sanctum.php | 67 + .../config/services.php | 34 + .../config/session.php | 201 + .../php-laravel-ext-mongodb/config/view.php | 36 + .../database/.gitignore | 1 + .../database/factories/UserFactory.php | 42 + .../2014_10_12_000000_create_users_table.php | 36 + ...12_100000_create_password_resets_table.php | 32 + ..._08_19_000000_create_failed_jobs_table.php | 36 + ...01_create_personal_access_tokens_table.php | 36 + .../database/seeders/DatabaseSeeder.php | 24 + .../docker-compose.yml | 96 + .../php-laravel-ext-mongodb/lang/en/auth.php | 20 + .../lang/en/pagination.php | 19 + .../lang/en/passwords.php | 22 + .../lang/en/validation.php | 170 + examples/php-laravel-ext-mongodb/package.json | 18 + examples/php-laravel-ext-mongodb/phpunit.xml | 30 + .../php-laravel-ext-mongodb/public/.htaccess | 21 + .../public/favicon.ico | 0 .../php-laravel-ext-mongodb/public/index.php | 55 + .../php-laravel-ext-mongodb/public/robots.txt | 2 + .../resources/css/app.css | 0 .../resources/js/app.js | 1 + .../resources/js/bootstrap.js | 31 + .../resources/views/welcome.blade.php | 132 + .../php-laravel-ext-mongodb/routes/api.php | 19 + .../routes/channels.php | 18 + .../routes/console.php | 19 + .../php-laravel-ext-mongodb/routes/web.php | 18 + .../storage/app/.gitignore | 3 + .../storage/app/public/.gitignore | 2 + .../storage/framework/.gitignore | 9 + .../storage/framework/cache/.gitignore | 3 + .../storage/framework/cache/data/.gitignore | 2 + .../storage/framework/sessions/.gitignore | 2 + .../storage/framework/views/.gitignore | 2 + .../storage/logs/.gitignore | 2 + .../tests/CreatesApplication.php | 22 + .../tests/Feature/ExampleTest.php | 21 + .../tests/TestCase.php | 10 + .../tests/Unit/ExampleTest.php | 18 + .../php-laravel-ext-mongodb/webpack.mix.js | 17 + examples/php-laravel/.env | 52 + examples/php-laravel/.gitignore | 1 - examples/php-vanilla/index.php | 2 +- .../builder/docker/incremental_cache.rs | 1 - src/providers/csharp.rs | 2 +- src/providers/php/Nixpacks/Config/Template.pm | 44 + src/providers/php/Nixpacks/Nix.pm | 13 + .../php/Nixpacks/Util/ChmodRecursive.pm | 16 + src/providers/php/mod.rs | 62 +- src/providers/php/nginx.template.conf | 4 +- src/providers/php/prestart.pl | 22 + src/providers/php/transform-config.pl | 55 - ...enerate_plan_tests__php_custom_config.snap | 50 + .../generate_plan_tests__php_laravel.snap | 15 +- ...e_plan_tests__php_laravel_ext_mongodb.snap | 69 + .../generate_plan_tests__php_vanilla.snap | 14 +- 104 files changed, 11657 insertions(+), 82 deletions(-) create mode 100644 examples/php-custom-config/nginx.template.conf create mode 100644 examples/php-custom-config/stuff/index.php create mode 100644 examples/php-laravel-ext-mongodb/.editorconfig create mode 100644 examples/php-laravel-ext-mongodb/.env create mode 100644 examples/php-laravel-ext-mongodb/.env.example create mode 100644 examples/php-laravel-ext-mongodb/.gitattributes create mode 100644 examples/php-laravel-ext-mongodb/.gitignore create mode 100644 examples/php-laravel-ext-mongodb/.styleci.yml create mode 100644 examples/php-laravel-ext-mongodb/README.md create mode 100644 examples/php-laravel-ext-mongodb/app/Console/Kernel.php create mode 100644 examples/php-laravel-ext-mongodb/app/Exceptions/Handler.php create mode 100644 examples/php-laravel-ext-mongodb/app/Http/Controllers/Controller.php create mode 100644 examples/php-laravel-ext-mongodb/app/Http/Kernel.php create mode 100644 examples/php-laravel-ext-mongodb/app/Http/Middleware/Authenticate.php create mode 100644 examples/php-laravel-ext-mongodb/app/Http/Middleware/EncryptCookies.php create mode 100644 examples/php-laravel-ext-mongodb/app/Http/Middleware/PreventRequestsDuringMaintenance.php create mode 100644 examples/php-laravel-ext-mongodb/app/Http/Middleware/RedirectIfAuthenticated.php create mode 100644 examples/php-laravel-ext-mongodb/app/Http/Middleware/TrimStrings.php create mode 100644 examples/php-laravel-ext-mongodb/app/Http/Middleware/TrustHosts.php create mode 100644 examples/php-laravel-ext-mongodb/app/Http/Middleware/TrustProxies.php create mode 100644 examples/php-laravel-ext-mongodb/app/Http/Middleware/VerifyCsrfToken.php create mode 100644 examples/php-laravel-ext-mongodb/app/Models/User.php create mode 100644 examples/php-laravel-ext-mongodb/app/Providers/AppServiceProvider.php create mode 100644 examples/php-laravel-ext-mongodb/app/Providers/AuthServiceProvider.php create mode 100644 examples/php-laravel-ext-mongodb/app/Providers/BroadcastServiceProvider.php create mode 100644 examples/php-laravel-ext-mongodb/app/Providers/EventServiceProvider.php create mode 100644 examples/php-laravel-ext-mongodb/app/Providers/RouteServiceProvider.php create mode 100755 examples/php-laravel-ext-mongodb/artisan create mode 100644 examples/php-laravel-ext-mongodb/bootstrap/app.php create mode 100644 examples/php-laravel-ext-mongodb/bootstrap/cache/.gitignore create mode 100644 examples/php-laravel-ext-mongodb/composer.json create mode 100644 examples/php-laravel-ext-mongodb/composer.lock create mode 100644 examples/php-laravel-ext-mongodb/config/app.php create mode 100644 examples/php-laravel-ext-mongodb/config/auth.php create mode 100644 examples/php-laravel-ext-mongodb/config/broadcasting.php create mode 100644 examples/php-laravel-ext-mongodb/config/cache.php create mode 100644 examples/php-laravel-ext-mongodb/config/cors.php create mode 100644 examples/php-laravel-ext-mongodb/config/database.php create mode 100644 examples/php-laravel-ext-mongodb/config/filesystems.php create mode 100644 examples/php-laravel-ext-mongodb/config/hashing.php create mode 100644 examples/php-laravel-ext-mongodb/config/logging.php create mode 100644 examples/php-laravel-ext-mongodb/config/mail.php create mode 100644 examples/php-laravel-ext-mongodb/config/queue.php create mode 100644 examples/php-laravel-ext-mongodb/config/sanctum.php create mode 100644 examples/php-laravel-ext-mongodb/config/services.php create mode 100644 examples/php-laravel-ext-mongodb/config/session.php create mode 100644 examples/php-laravel-ext-mongodb/config/view.php create mode 100644 examples/php-laravel-ext-mongodb/database/.gitignore create mode 100644 examples/php-laravel-ext-mongodb/database/factories/UserFactory.php create mode 100644 examples/php-laravel-ext-mongodb/database/migrations/2014_10_12_000000_create_users_table.php create mode 100644 examples/php-laravel-ext-mongodb/database/migrations/2014_10_12_100000_create_password_resets_table.php create mode 100644 examples/php-laravel-ext-mongodb/database/migrations/2019_08_19_000000_create_failed_jobs_table.php create mode 100644 examples/php-laravel-ext-mongodb/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php create mode 100644 examples/php-laravel-ext-mongodb/database/seeders/DatabaseSeeder.php create mode 100644 examples/php-laravel-ext-mongodb/docker-compose.yml create mode 100644 examples/php-laravel-ext-mongodb/lang/en/auth.php create mode 100644 examples/php-laravel-ext-mongodb/lang/en/pagination.php create mode 100644 examples/php-laravel-ext-mongodb/lang/en/passwords.php create mode 100644 examples/php-laravel-ext-mongodb/lang/en/validation.php create mode 100644 examples/php-laravel-ext-mongodb/package.json create mode 100644 examples/php-laravel-ext-mongodb/phpunit.xml create mode 100644 examples/php-laravel-ext-mongodb/public/.htaccess create mode 100644 examples/php-laravel-ext-mongodb/public/favicon.ico create mode 100644 examples/php-laravel-ext-mongodb/public/index.php create mode 100644 examples/php-laravel-ext-mongodb/public/robots.txt create mode 100644 examples/php-laravel-ext-mongodb/resources/css/app.css create mode 100644 examples/php-laravel-ext-mongodb/resources/js/app.js create mode 100644 examples/php-laravel-ext-mongodb/resources/js/bootstrap.js create mode 100644 examples/php-laravel-ext-mongodb/resources/views/welcome.blade.php create mode 100644 examples/php-laravel-ext-mongodb/routes/api.php create mode 100644 examples/php-laravel-ext-mongodb/routes/channels.php create mode 100644 examples/php-laravel-ext-mongodb/routes/console.php create mode 100644 examples/php-laravel-ext-mongodb/routes/web.php create mode 100644 examples/php-laravel-ext-mongodb/storage/app/.gitignore create mode 100644 examples/php-laravel-ext-mongodb/storage/app/public/.gitignore create mode 100644 examples/php-laravel-ext-mongodb/storage/framework/.gitignore create mode 100644 examples/php-laravel-ext-mongodb/storage/framework/cache/.gitignore create mode 100644 examples/php-laravel-ext-mongodb/storage/framework/cache/data/.gitignore create mode 100644 examples/php-laravel-ext-mongodb/storage/framework/sessions/.gitignore create mode 100644 examples/php-laravel-ext-mongodb/storage/framework/views/.gitignore create mode 100644 examples/php-laravel-ext-mongodb/storage/logs/.gitignore create mode 100644 examples/php-laravel-ext-mongodb/tests/CreatesApplication.php create mode 100644 examples/php-laravel-ext-mongodb/tests/Feature/ExampleTest.php create mode 100644 examples/php-laravel-ext-mongodb/tests/TestCase.php create mode 100644 examples/php-laravel-ext-mongodb/tests/Unit/ExampleTest.php create mode 100644 examples/php-laravel-ext-mongodb/webpack.mix.js create mode 100644 examples/php-laravel/.env create mode 100644 src/providers/php/Nixpacks/Config/Template.pm create mode 100644 src/providers/php/Nixpacks/Nix.pm create mode 100644 src/providers/php/Nixpacks/Util/ChmodRecursive.pm create mode 100755 src/providers/php/prestart.pl delete mode 100755 src/providers/php/transform-config.pl create mode 100644 tests/snapshots/generate_plan_tests__php_custom_config.snap create mode 100644 tests/snapshots/generate_plan_tests__php_laravel_ext_mongodb.snap diff --git a/.gitignore b/.gitignore index e7fcea8da..36da0ac54 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,4 @@ result .vscode/ +.vstags diff --git a/docs/pages/docs/providers/php.md b/docs/pages/docs/providers/php.md index 88113c23b..f1e2f4720 100644 --- a/docs/pages/docs/providers/php.md +++ b/docs/pages/docs/providers/php.md @@ -4,7 +4,13 @@ title: PHP # {% $markdoc.frontmatter.title %} -Php is detected if a `composer.json` OR `index.php` file is found. +PHP is detected if a `composer.json` OR `index.php` file is found. + +Note that Laravel apps need an `APP_KEY` environment variable in order to work. + +If an `nginx.conf` or `nginx.template.conf` (see [this file](https://github.com/railwayapp/nixpacks/blob/main/src/providers/php/nginx.template.conf) for an example of template syntax) file is found in the project root directory, that configuration will be used. + +If a `NIXPACKS_PHP_ROOT_DIR` variable is passed, that will be used as the server root. ## Setup @@ -40,6 +46,7 @@ if package.json ## Start +This provider runs a Perl script to correct permissions and manage the Nginx configuration, and then starts Nginx. ``` {nginx_start_serving_cmd} ``` diff --git a/examples/php-custom-config/nginx.template.conf b/examples/php-custom-config/nginx.template.conf new file mode 100644 index 000000000..2fbfdd366 --- /dev/null +++ b/examples/php-custom-config/nginx.template.conf @@ -0,0 +1,51 @@ +worker_processes 5; +daemon off; + +worker_rlimit_nofile 8192; + +events { + worker_connections 4096; # Default: 1024 +} + +http { + include $!{nginx}/conf/mime.types; + index index.html index.htm index.php; + + default_type application/octet-stream; + log_format main '$remote_addr - $remote_user [$time_local] $status ' + '"$request" $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + access_log /dev/stdout; + error_log /dev/stdout; + sendfile on; + tcp_nopush on; + server_names_hash_bucket_size 128; # this seems to be required for some vhosts + + server { + listen ${PORT}; + listen [::]:${PORT}; + server_name localhost; + root /app/stuff; + + add_header X-Frame-Options "SAMEORIGIN"; + add_header X-Content-Type-Options "nosniff"; + + index index.php; + + charset utf-8; + + location = /favicon.ico { access_log off; log_not_found off; } + location = /robots.txt { access_log off; log_not_found off; } + + location ~ \.php$ { + fastcgi_pass 127.0.0.1:9000; + fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; + include $!{nginx}/conf/fastcgi_params; + include $!{nginx}/conf/fastcgi.conf; + } + + location ~ /\.(?!well-known).* { + deny all; + } + } +} \ No newline at end of file diff --git a/examples/php-custom-config/stuff/index.php b/examples/php-custom-config/stuff/index.php new file mode 100644 index 000000000..cbc764682 --- /dev/null +++ b/examples/php-custom-config/stuff/index.php @@ -0,0 +1,41 @@ + + + + Hello World! + + + +
+

Hello World!

+

Welcome to Nixpacks!

+

PHP Version:

+
+ + \ No newline at end of file diff --git a/examples/php-laravel-ext-mongodb/.editorconfig b/examples/php-laravel-ext-mongodb/.editorconfig new file mode 100644 index 000000000..1671c9b9d --- /dev/null +++ b/examples/php-laravel-ext-mongodb/.editorconfig @@ -0,0 +1,18 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + +[*.{yml,yaml}] +indent_size = 2 + +[docker-compose.yml] +indent_size = 4 diff --git a/examples/php-laravel-ext-mongodb/.env b/examples/php-laravel-ext-mongodb/.env new file mode 100644 index 000000000..b3c3fb90d --- /dev/null +++ b/examples/php-laravel-ext-mongodb/.env @@ -0,0 +1,52 @@ +APP_NAME=Laravel +APP_ENV=local +APP_KEY=base64:VWcxA9RjbkRMR61jtuWJJ5P7NmTNdDT7gDyjI8OD9J8= +APP_DEBUG=true +APP_URL=http://localhost + +LOG_CHANNEL=stack +LOG_DEPRECATIONS_CHANNEL=null +LOG_LEVEL=debug + +DB_CONNECTION=mysql +DB_HOST=127.0.0.1 +DB_PORT=3306 +DB_DATABASE=php_laravel +DB_USERNAME=root +DB_PASSWORD= + +BROADCAST_DRIVER=log +CACHE_DRIVER=file +FILESYSTEM_DISK=local +QUEUE_CONNECTION=sync +SESSION_DRIVER=file +SESSION_LIFETIME=120 + +MEMCACHED_HOST=127.0.0.1 + +REDIS_HOST=127.0.0.1 +REDIS_PASSWORD=null +REDIS_PORT=6379 + +MAIL_MAILER=smtp +MAIL_HOST=mailhog +MAIL_PORT=1025 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_ENCRYPTION=null +MAIL_FROM_ADDRESS="hello@example.com" +MAIL_FROM_NAME="${APP_NAME}" + +AWS_ACCESS_KEY_ID= +AWS_SECRET_ACCESS_KEY= +AWS_DEFAULT_REGION=us-east-1 +AWS_BUCKET= +AWS_USE_PATH_STYLE_ENDPOINT=false + +PUSHER_APP_ID= +PUSHER_APP_KEY= +PUSHER_APP_SECRET= +PUSHER_APP_CLUSTER=mt1 + +MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" +MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" diff --git a/examples/php-laravel-ext-mongodb/.env.example b/examples/php-laravel-ext-mongodb/.env.example new file mode 100644 index 000000000..5a60d022b --- /dev/null +++ b/examples/php-laravel-ext-mongodb/.env.example @@ -0,0 +1,52 @@ +APP_NAME=Laravel +APP_ENV=local +APP_KEY= +APP_DEBUG=true +APP_URL=http://localhost + +LOG_CHANNEL=stack +LOG_DEPRECATIONS_CHANNEL=null +LOG_LEVEL=debug + +DB_CONNECTION=mysql +DB_HOST=127.0.0.1 +DB_PORT=3306 +DB_DATABASE=php_laravel +DB_USERNAME=root +DB_PASSWORD= + +BROADCAST_DRIVER=log +CACHE_DRIVER=file +FILESYSTEM_DISK=local +QUEUE_CONNECTION=sync +SESSION_DRIVER=file +SESSION_LIFETIME=120 + +MEMCACHED_HOST=127.0.0.1 + +REDIS_HOST=127.0.0.1 +REDIS_PASSWORD=null +REDIS_PORT=6379 + +MAIL_MAILER=smtp +MAIL_HOST=mailhog +MAIL_PORT=1025 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_ENCRYPTION=null +MAIL_FROM_ADDRESS="hello@example.com" +MAIL_FROM_NAME="${APP_NAME}" + +AWS_ACCESS_KEY_ID= +AWS_SECRET_ACCESS_KEY= +AWS_DEFAULT_REGION=us-east-1 +AWS_BUCKET= +AWS_USE_PATH_STYLE_ENDPOINT=false + +PUSHER_APP_ID= +PUSHER_APP_KEY= +PUSHER_APP_SECRET= +PUSHER_APP_CLUSTER=mt1 + +MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" +MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" diff --git a/examples/php-laravel-ext-mongodb/.gitattributes b/examples/php-laravel-ext-mongodb/.gitattributes new file mode 100644 index 000000000..510d9961f --- /dev/null +++ b/examples/php-laravel-ext-mongodb/.gitattributes @@ -0,0 +1,10 @@ +* text=auto + +*.blade.php diff=html +*.css diff=css +*.html diff=html +*.md diff=markdown +*.php diff=php + +/.github export-ignore +CHANGELOG.md export-ignore diff --git a/examples/php-laravel-ext-mongodb/.gitignore b/examples/php-laravel-ext-mongodb/.gitignore new file mode 100644 index 000000000..f7534cf00 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/.gitignore @@ -0,0 +1,13 @@ +/node_modules +/public/hot +/public/storage +/storage/*.key +/vendor +.env.backup +.phpunit.result.cache +Homestead.json +Homestead.yaml +npm-debug.log +yarn-error.log +/.idea +/.vscode diff --git a/examples/php-laravel-ext-mongodb/.styleci.yml b/examples/php-laravel-ext-mongodb/.styleci.yml new file mode 100644 index 000000000..79f63b44f --- /dev/null +++ b/examples/php-laravel-ext-mongodb/.styleci.yml @@ -0,0 +1,12 @@ +php: + preset: laravel + disabled: + - no_unused_imports + finder: + not-name: + - index.php +js: + finder: + not-name: + - webpack.mix.js +css: true diff --git a/examples/php-laravel-ext-mongodb/README.md b/examples/php-laravel-ext-mongodb/README.md new file mode 100644 index 000000000..f171ecacc --- /dev/null +++ b/examples/php-laravel-ext-mongodb/README.md @@ -0,0 +1,64 @@ +

+ +

+Build Status +Total Downloads +Latest Stable Version +License +

+ +## About Laravel + +Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as: + +- [Simple, fast routing engine](https://laravel.com/docs/routing). +- [Powerful dependency injection container](https://laravel.com/docs/container). +- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. +- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). +- Database agnostic [schema migrations](https://laravel.com/docs/migrations). +- [Robust background job processing](https://laravel.com/docs/queues). +- [Real-time event broadcasting](https://laravel.com/docs/broadcasting). + +Laravel is accessible, powerful, and provides tools required for large, robust applications. + +## Learning Laravel + +Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. + +If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library. + +## Laravel Sponsors + +We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell). + +### Premium Partners + +- **[Vehikl](https://vehikl.com/)** +- **[Tighten Co.](https://tighten.co)** +- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)** +- **[64 Robots](https://64robots.com)** +- **[Cubet Techno Labs](https://cubettech.com)** +- **[Cyber-Duck](https://cyber-duck.co.uk)** +- **[Many](https://www.many.co.uk)** +- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)** +- **[DevSquad](https://devsquad.com)** +- **[Curotec](https://www.curotec.com/services/technologies/laravel/)** +- **[OP.GG](https://op.gg)** +- **[WebReinvent](https://webreinvent.com/?utm_source=laravel&utm_medium=github&utm_campaign=patreon-sponsors)** +- **[Lendio](https://lendio.com)** + +## Contributing + +Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). + +## Code of Conduct + +In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). + +## Security Vulnerabilities + +If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed. + +## License + +The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). diff --git a/examples/php-laravel-ext-mongodb/app/Console/Kernel.php b/examples/php-laravel-ext-mongodb/app/Console/Kernel.php new file mode 100644 index 000000000..d8bc1d29f --- /dev/null +++ b/examples/php-laravel-ext-mongodb/app/Console/Kernel.php @@ -0,0 +1,32 @@ +command('inspire')->hourly(); + } + + /** + * Register the commands for the application. + * + * @return void + */ + protected function commands() + { + $this->load(__DIR__.'/Commands'); + + require base_path('routes/console.php'); + } +} diff --git a/examples/php-laravel-ext-mongodb/app/Exceptions/Handler.php b/examples/php-laravel-ext-mongodb/app/Exceptions/Handler.php new file mode 100644 index 000000000..82a37e400 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/app/Exceptions/Handler.php @@ -0,0 +1,50 @@ +, \Psr\Log\LogLevel::*> + */ + protected $levels = [ + // + ]; + + /** + * A list of the exception types that are not reported. + * + * @var array> + */ + protected $dontReport = [ + // + ]; + + /** + * A list of the inputs that are never flashed to the session on validation exceptions. + * + * @var array + */ + protected $dontFlash = [ + 'current_password', + 'password', + 'password_confirmation', + ]; + + /** + * Register the exception handling callbacks for the application. + * + * @return void + */ + public function register() + { + $this->reportable(function (Throwable $e) { + // + }); + } +} diff --git a/examples/php-laravel-ext-mongodb/app/Http/Controllers/Controller.php b/examples/php-laravel-ext-mongodb/app/Http/Controllers/Controller.php new file mode 100644 index 000000000..a0a2a8a34 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/app/Http/Controllers/Controller.php @@ -0,0 +1,13 @@ + + */ + protected $middleware = [ + // \App\Http\Middleware\TrustHosts::class, + \App\Http\Middleware\TrustProxies::class, + \Illuminate\Http\Middleware\HandleCors::class, + \App\Http\Middleware\PreventRequestsDuringMaintenance::class, + \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, + \App\Http\Middleware\TrimStrings::class, + \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, + ]; + + /** + * The application's route middleware groups. + * + * @var array> + */ + protected $middlewareGroups = [ + 'web' => [ + \App\Http\Middleware\EncryptCookies::class, + \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, + \Illuminate\Session\Middleware\StartSession::class, + \Illuminate\View\Middleware\ShareErrorsFromSession::class, + \App\Http\Middleware\VerifyCsrfToken::class, + \Illuminate\Routing\Middleware\SubstituteBindings::class, + ], + + 'api' => [ + // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, + 'throttle:api', + \Illuminate\Routing\Middleware\SubstituteBindings::class, + ], + ]; + + /** + * The application's route middleware. + * + * These middleware may be assigned to groups or used individually. + * + * @var array + */ + protected $routeMiddleware = [ + 'auth' => \App\Http\Middleware\Authenticate::class, + 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, + 'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class, + 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, + 'can' => \Illuminate\Auth\Middleware\Authorize::class, + 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, + 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, + 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, + 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, + 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, + ]; +} diff --git a/examples/php-laravel-ext-mongodb/app/Http/Middleware/Authenticate.php b/examples/php-laravel-ext-mongodb/app/Http/Middleware/Authenticate.php new file mode 100644 index 000000000..704089a7f --- /dev/null +++ b/examples/php-laravel-ext-mongodb/app/Http/Middleware/Authenticate.php @@ -0,0 +1,21 @@ +expectsJson()) { + return route('login'); + } + } +} diff --git a/examples/php-laravel-ext-mongodb/app/Http/Middleware/EncryptCookies.php b/examples/php-laravel-ext-mongodb/app/Http/Middleware/EncryptCookies.php new file mode 100644 index 000000000..867695bdc --- /dev/null +++ b/examples/php-laravel-ext-mongodb/app/Http/Middleware/EncryptCookies.php @@ -0,0 +1,17 @@ + + */ + protected $except = [ + // + ]; +} diff --git a/examples/php-laravel-ext-mongodb/app/Http/Middleware/PreventRequestsDuringMaintenance.php b/examples/php-laravel-ext-mongodb/app/Http/Middleware/PreventRequestsDuringMaintenance.php new file mode 100644 index 000000000..74cbd9a9e --- /dev/null +++ b/examples/php-laravel-ext-mongodb/app/Http/Middleware/PreventRequestsDuringMaintenance.php @@ -0,0 +1,17 @@ + + */ + protected $except = [ + // + ]; +} diff --git a/examples/php-laravel-ext-mongodb/app/Http/Middleware/RedirectIfAuthenticated.php b/examples/php-laravel-ext-mongodb/app/Http/Middleware/RedirectIfAuthenticated.php new file mode 100644 index 000000000..a2813a064 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/app/Http/Middleware/RedirectIfAuthenticated.php @@ -0,0 +1,32 @@ +check()) { + return redirect(RouteServiceProvider::HOME); + } + } + + return $next($request); + } +} diff --git a/examples/php-laravel-ext-mongodb/app/Http/Middleware/TrimStrings.php b/examples/php-laravel-ext-mongodb/app/Http/Middleware/TrimStrings.php new file mode 100644 index 000000000..88cadcaaf --- /dev/null +++ b/examples/php-laravel-ext-mongodb/app/Http/Middleware/TrimStrings.php @@ -0,0 +1,19 @@ + + */ + protected $except = [ + 'current_password', + 'password', + 'password_confirmation', + ]; +} diff --git a/examples/php-laravel-ext-mongodb/app/Http/Middleware/TrustHosts.php b/examples/php-laravel-ext-mongodb/app/Http/Middleware/TrustHosts.php new file mode 100644 index 000000000..7186414c6 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/app/Http/Middleware/TrustHosts.php @@ -0,0 +1,20 @@ + + */ + public function hosts() + { + return [ + $this->allSubdomainsOfApplicationUrl(), + ]; + } +} diff --git a/examples/php-laravel-ext-mongodb/app/Http/Middleware/TrustProxies.php b/examples/php-laravel-ext-mongodb/app/Http/Middleware/TrustProxies.php new file mode 100644 index 000000000..3391630ec --- /dev/null +++ b/examples/php-laravel-ext-mongodb/app/Http/Middleware/TrustProxies.php @@ -0,0 +1,28 @@ +|string|null + */ + protected $proxies; + + /** + * The headers that should be used to detect proxies. + * + * @var int + */ + protected $headers = + Request::HEADER_X_FORWARDED_FOR | + Request::HEADER_X_FORWARDED_HOST | + Request::HEADER_X_FORWARDED_PORT | + Request::HEADER_X_FORWARDED_PROTO | + Request::HEADER_X_FORWARDED_AWS_ELB; +} diff --git a/examples/php-laravel-ext-mongodb/app/Http/Middleware/VerifyCsrfToken.php b/examples/php-laravel-ext-mongodb/app/Http/Middleware/VerifyCsrfToken.php new file mode 100644 index 000000000..9e8652172 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/app/Http/Middleware/VerifyCsrfToken.php @@ -0,0 +1,17 @@ + + */ + protected $except = [ + // + ]; +} diff --git a/examples/php-laravel-ext-mongodb/app/Models/User.php b/examples/php-laravel-ext-mongodb/app/Models/User.php new file mode 100644 index 000000000..89963686e --- /dev/null +++ b/examples/php-laravel-ext-mongodb/app/Models/User.php @@ -0,0 +1,44 @@ + + */ + protected $fillable = [ + 'name', + 'email', + 'password', + ]; + + /** + * The attributes that should be hidden for serialization. + * + * @var array + */ + protected $hidden = [ + 'password', + 'remember_token', + ]; + + /** + * The attributes that should be cast. + * + * @var array + */ + protected $casts = [ + 'email_verified_at' => 'datetime', + ]; +} diff --git a/examples/php-laravel-ext-mongodb/app/Providers/AppServiceProvider.php b/examples/php-laravel-ext-mongodb/app/Providers/AppServiceProvider.php new file mode 100644 index 000000000..ee8ca5bcd --- /dev/null +++ b/examples/php-laravel-ext-mongodb/app/Providers/AppServiceProvider.php @@ -0,0 +1,28 @@ + + */ + protected $policies = [ + // 'App\Models\Model' => 'App\Policies\ModelPolicy', + ]; + + /** + * Register any authentication / authorization services. + * + * @return void + */ + public function boot() + { + $this->registerPolicies(); + + // + } +} diff --git a/examples/php-laravel-ext-mongodb/app/Providers/BroadcastServiceProvider.php b/examples/php-laravel-ext-mongodb/app/Providers/BroadcastServiceProvider.php new file mode 100644 index 000000000..395c518bc --- /dev/null +++ b/examples/php-laravel-ext-mongodb/app/Providers/BroadcastServiceProvider.php @@ -0,0 +1,21 @@ +> + */ + protected $listen = [ + Registered::class => [ + SendEmailVerificationNotification::class, + ], + ]; + + /** + * Register any events for your application. + * + * @return void + */ + public function boot() + { + // + } + + /** + * Determine if events and listeners should be automatically discovered. + * + * @return bool + */ + public function shouldDiscoverEvents() + { + return false; + } +} diff --git a/examples/php-laravel-ext-mongodb/app/Providers/RouteServiceProvider.php b/examples/php-laravel-ext-mongodb/app/Providers/RouteServiceProvider.php new file mode 100644 index 000000000..ea87f2e57 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/app/Providers/RouteServiceProvider.php @@ -0,0 +1,52 @@ +configureRateLimiting(); + + $this->routes(function () { + Route::middleware('api') + ->prefix('api') + ->group(base_path('routes/api.php')); + + Route::middleware('web') + ->group(base_path('routes/web.php')); + }); + } + + /** + * Configure the rate limiters for the application. + * + * @return void + */ + protected function configureRateLimiting() + { + RateLimiter::for('api', function (Request $request) { + return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip()); + }); + } +} diff --git a/examples/php-laravel-ext-mongodb/artisan b/examples/php-laravel-ext-mongodb/artisan new file mode 100755 index 000000000..67a3329b1 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/artisan @@ -0,0 +1,53 @@ +#!/usr/bin/env php +make(Illuminate\Contracts\Console\Kernel::class); + +$status = $kernel->handle( + $input = new Symfony\Component\Console\Input\ArgvInput, + new Symfony\Component\Console\Output\ConsoleOutput +); + +/* +|-------------------------------------------------------------------------- +| Shutdown The Application +|-------------------------------------------------------------------------- +| +| Once Artisan has finished running, we will fire off the shutdown events +| so that any final work may be done by the application before we shut +| down the process. This is the last thing to happen to the request. +| +*/ + +$kernel->terminate($input, $status); + +exit($status); diff --git a/examples/php-laravel-ext-mongodb/bootstrap/app.php b/examples/php-laravel-ext-mongodb/bootstrap/app.php new file mode 100644 index 000000000..037e17df0 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/bootstrap/app.php @@ -0,0 +1,55 @@ +singleton( + Illuminate\Contracts\Http\Kernel::class, + App\Http\Kernel::class +); + +$app->singleton( + Illuminate\Contracts\Console\Kernel::class, + App\Console\Kernel::class +); + +$app->singleton( + Illuminate\Contracts\Debug\ExceptionHandler::class, + App\Exceptions\Handler::class +); + +/* +|-------------------------------------------------------------------------- +| Return The Application +|-------------------------------------------------------------------------- +| +| This script returns the application instance. The instance is given to +| the calling script so we can separate the building of the instances +| from the actual running of the application and sending responses. +| +*/ + +return $app; diff --git a/examples/php-laravel-ext-mongodb/bootstrap/cache/.gitignore b/examples/php-laravel-ext-mongodb/bootstrap/cache/.gitignore new file mode 100644 index 000000000..d6b7ef32c --- /dev/null +++ b/examples/php-laravel-ext-mongodb/bootstrap/cache/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/examples/php-laravel-ext-mongodb/composer.json b/examples/php-laravel-ext-mongodb/composer.json new file mode 100644 index 000000000..eeab8408f --- /dev/null +++ b/examples/php-laravel-ext-mongodb/composer.json @@ -0,0 +1,62 @@ +{ + "name": "laravel/laravel", + "type": "project", + "description": "The Laravel Framework.", + "keywords": ["framework", "laravel"], + "license": "MIT", + "require": { + "php": "^8.1", + "guzzlehttp/guzzle": "^7.2", + "laravel/framework": "^9.11", + "laravel/sanctum": "^2.14.1", + "laravel/tinker": "^2.7", + "ext-mongodb": "*" + }, + "require-dev": { + "fakerphp/faker": "^1.9.1", + "laravel/sail": "^1.0.1", + "mockery/mockery": "^1.4.4", + "nunomaduro/collision": "^6.1", + "phpunit/phpunit": "^9.5.10", + "spatie/laravel-ignition": "^1.0" + }, + "autoload": { + "psr-4": { + "App\\": "app/", + "Database\\Factories\\": "database/factories/", + "Database\\Seeders\\": "database/seeders/" + } + }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/" + } + }, + "scripts": { + "post-autoload-dump": [ + "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", + "@php artisan package:discover --ansi" + ], + "post-update-cmd": [ + "@php artisan vendor:publish --tag=laravel-assets --ansi --force" + ], + "post-root-package-install": [ + "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" + ], + "post-create-project-cmd": [ + "@php artisan key:generate --ansi" + ] + }, + "extra": { + "laravel": { + "dont-discover": [] + } + }, + "config": { + "optimize-autoloader": true, + "preferred-install": "dist", + "sort-packages": true + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/examples/php-laravel-ext-mongodb/composer.lock b/examples/php-laravel-ext-mongodb/composer.lock new file mode 100644 index 000000000..ff936e883 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/composer.lock @@ -0,0 +1,7771 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "1abc7822bd9f28e9a62986817bf04f76", + "packages": [ + { + "name": "brick/math", + "version": "0.9.3", + "source": { + "type": "git", + "url": "https://github.com/brick/math.git", + "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/brick/math/zipball/ca57d18f028f84f777b2168cd1911b0dee2343ae", + "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0", + "vimeo/psalm": "4.9.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Brick\\Math\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Arbitrary-precision arithmetic library", + "keywords": [ + "Arbitrary-precision", + "BigInteger", + "BigRational", + "arithmetic", + "bigdecimal", + "bignum", + "brick", + "math" + ], + "support": { + "issues": "https://github.com/brick/math/issues", + "source": "https://github.com/brick/math/tree/0.9.3" + }, + "funding": [ + { + "url": "https://github.com/BenMorel", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/brick/math", + "type": "tidelift" + } + ], + "time": "2021-08-15T20:50:18+00:00" + }, + { + "name": "dflydev/dot-access-data", + "version": "v3.0.1", + "source": { + "type": "git", + "url": "https://github.com/dflydev/dflydev-dot-access-data.git", + "reference": "0992cc19268b259a39e86f296da5f0677841f42c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/0992cc19268b259a39e86f296da5f0677841f42c", + "reference": "0992cc19268b259a39e86f296da5f0677841f42c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.42", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.3", + "scrutinizer/ocular": "1.6.0", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^3.14" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Dflydev\\DotAccessData\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dragonfly Development Inc.", + "email": "info@dflydev.com", + "homepage": "http://dflydev.com" + }, + { + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" + }, + { + "name": "Carlos Frutos", + "email": "carlos@kiwing.it", + "homepage": "https://github.com/cfrutos" + }, + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com" + } + ], + "description": "Given a deep data structure, access data by dot notation.", + "homepage": "https://github.com/dflydev/dflydev-dot-access-data", + "keywords": [ + "access", + "data", + "dot", + "notation" + ], + "support": { + "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues", + "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.1" + }, + "time": "2021-08-13T13:06:58+00:00" + }, + { + "name": "doctrine/inflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89", + "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "vimeo/psalm": "^4.10" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", + "keywords": [ + "inflection", + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" + ], + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } + ], + "time": "2021-10-22T20:16:43+00:00" + }, + { + "name": "doctrine/lexer", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9.0", + "phpstan/phpstan": "^1.3", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.11" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.2.3" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2022-02-28T11:07:21+00:00" + }, + { + "name": "dragonmantank/cron-expression", + "version": "v3.3.1", + "source": { + "type": "git", + "url": "https://github.com/dragonmantank/cron-expression.git", + "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/be85b3f05b46c39bbc0d95f6c071ddff669510fa", + "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0", + "webmozart/assert": "^1.0" + }, + "replace": { + "mtdowling/cron-expression": "^1.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-webmozart-assert": "^1.0", + "phpunit/phpunit": "^7.0|^8.0|^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Cron\\": "src/Cron/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Tankersley", + "email": "chris@ctankersley.com", + "homepage": "https://github.com/dragonmantank" + } + ], + "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", + "keywords": [ + "cron", + "schedule" + ], + "support": { + "issues": "https://github.com/dragonmantank/cron-expression/issues", + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.1" + }, + "funding": [ + { + "url": "https://github.com/dragonmantank", + "type": "github" + } + ], + "time": "2022-01-18T15:43:28+00:00" + }, + { + "name": "egulias/email-validator", + "version": "3.2", + "source": { + "type": "git", + "url": "https://github.com/egulias/EmailValidator.git", + "reference": "a5ed8d58ed0c340a7c2109f587951b1c84cf6286" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/a5ed8d58ed0c340a7c2109f587951b1c84cf6286", + "reference": "a5ed8d58ed0c340a7c2109f587951b1c84cf6286", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^1.2", + "php": ">=7.2", + "symfony/polyfill-intl-idn": "^1.15" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^8.5.8|^9.3.3", + "vimeo/psalm": "^4" + }, + "suggest": { + "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Egulias\\EmailValidator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eduardo Gulias Davis" + } + ], + "description": "A library for validating emails against several RFCs", + "homepage": "https://github.com/egulias/EmailValidator", + "keywords": [ + "email", + "emailvalidation", + "emailvalidator", + "validation", + "validator" + ], + "support": { + "issues": "https://github.com/egulias/EmailValidator/issues", + "source": "https://github.com/egulias/EmailValidator/tree/3.2" + }, + "funding": [ + { + "url": "https://github.com/egulias", + "type": "github" + } + ], + "time": "2022-05-28T22:19:18+00:00" + }, + { + "name": "fruitcake/php-cors", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/fruitcake/php-cors.git", + "reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fruitcake/php-cors/zipball/58571acbaa5f9f462c9c77e911700ac66f446d4e", + "reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0", + "symfony/http-foundation": "^4.4|^5.4|^6" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "phpunit/phpunit": "^9", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Fruitcake\\Cors\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fruitcake", + "homepage": "https://fruitcake.nl" + }, + { + "name": "Barryvdh", + "email": "barryvdh@gmail.com" + } + ], + "description": "Cross-origin resource sharing library for the Symfony HttpFoundation", + "homepage": "https://github.com/fruitcake/php-cors", + "keywords": [ + "cors", + "laravel", + "symfony" + ], + "support": { + "issues": "https://github.com/fruitcake/php-cors/issues", + "source": "https://github.com/fruitcake/php-cors/tree/v1.2.0" + }, + "funding": [ + { + "url": "https://fruitcake.nl", + "type": "custom" + }, + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2022-02-20T15:07:15+00:00" + }, + { + "name": "graham-campbell/result-type", + "version": "v1.0.4", + "source": { + "type": "git", + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "0690bde05318336c7221785f2a932467f98b64ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/0690bde05318336c7221785f2a932467f98b64ca", + "reference": "0690bde05318336c7221785f2a932467f98b64ca", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "phpoption/phpoption": "^1.8" + }, + "require-dev": { + "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19 || ^9.5.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "An Implementation Of The Result Type", + "keywords": [ + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" + ], + "support": { + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.4" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "time": "2021-11-21T21:41:47+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.4.4", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "e3ff079b22820c2029d4c2a87796b6a0b8716ad8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/e3ff079b22820c2029d4c2a87796b6a0b8716ad8", + "reference": "e3ff079b22820c2029d4c2a87796b6a0b8716ad8", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.5", + "guzzlehttp/psr7": "^1.8.3 || ^2.1", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "ext-curl": "*", + "php-http/client-integration-tests": "^3.0", + "phpunit/phpunit": "^8.5.5 || ^9.3.5", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.4-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.4.4" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2022-06-09T21:39:15+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "symfony/phpunit-bridge": "^4.4 || ^5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/1.5.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2021-10-22T20:56:57+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "83260bb50b8fc753c72d14dc1621a2dac31877ee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/83260bb50b8fc753c72d14dc1621a2dac31877ee", + "reference": "83260bb50b8fc753c72d14dc1621a2dac31877ee", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.8 || ^9.3.10" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.3.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2022-06-09T08:26:02+00:00" + }, + { + "name": "laravel/framework", + "version": "v9.17.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/framework.git", + "reference": "091e287678ac723c591509ca6374e4ded4a99b1c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/framework/zipball/091e287678ac723c591509ca6374e4ded4a99b1c", + "reference": "091e287678ac723c591509ca6374e4ded4a99b1c", + "shasum": "" + }, + "require": { + "doctrine/inflector": "^2.0", + "dragonmantank/cron-expression": "^3.1", + "egulias/email-validator": "^3.1", + "ext-mbstring": "*", + "ext-openssl": "*", + "fruitcake/php-cors": "^1.2", + "laravel/serializable-closure": "^1.0", + "league/commonmark": "^2.2", + "league/flysystem": "^3.0", + "monolog/monolog": "^2.0", + "nesbot/carbon": "^2.53.1", + "php": "^8.0.2", + "psr/container": "^1.1.1|^2.0.1", + "psr/log": "^1.0|^2.0|^3.0", + "psr/simple-cache": "^1.0|^2.0|^3.0", + "ramsey/uuid": "^4.2.2", + "symfony/console": "^6.0", + "symfony/error-handler": "^6.0", + "symfony/finder": "^6.0", + "symfony/http-foundation": "^6.0", + "symfony/http-kernel": "^6.0", + "symfony/mailer": "^6.0", + "symfony/mime": "^6.0", + "symfony/process": "^6.0", + "symfony/routing": "^6.0", + "symfony/var-dumper": "^6.0", + "tijsverkoyen/css-to-inline-styles": "^2.2.2", + "vlucas/phpdotenv": "^5.4.1", + "voku/portable-ascii": "^2.0" + }, + "conflict": { + "tightenco/collect": "<5.5.33" + }, + "provide": { + "psr/container-implementation": "1.1|2.0", + "psr/simple-cache-implementation": "1.0|2.0|3.0" + }, + "replace": { + "illuminate/auth": "self.version", + "illuminate/broadcasting": "self.version", + "illuminate/bus": "self.version", + "illuminate/cache": "self.version", + "illuminate/collections": "self.version", + "illuminate/conditionable": "self.version", + "illuminate/config": "self.version", + "illuminate/console": "self.version", + "illuminate/container": "self.version", + "illuminate/contracts": "self.version", + "illuminate/cookie": "self.version", + "illuminate/database": "self.version", + "illuminate/encryption": "self.version", + "illuminate/events": "self.version", + "illuminate/filesystem": "self.version", + "illuminate/hashing": "self.version", + "illuminate/http": "self.version", + "illuminate/log": "self.version", + "illuminate/macroable": "self.version", + "illuminate/mail": "self.version", + "illuminate/notifications": "self.version", + "illuminate/pagination": "self.version", + "illuminate/pipeline": "self.version", + "illuminate/queue": "self.version", + "illuminate/redis": "self.version", + "illuminate/routing": "self.version", + "illuminate/session": "self.version", + "illuminate/support": "self.version", + "illuminate/testing": "self.version", + "illuminate/translation": "self.version", + "illuminate/validation": "self.version", + "illuminate/view": "self.version" + }, + "require-dev": { + "aws/aws-sdk-php": "^3.198.1", + "doctrine/dbal": "^2.13.3|^3.1.4", + "fakerphp/faker": "^1.9.2", + "guzzlehttp/guzzle": "^7.2", + "league/flysystem-aws-s3-v3": "^3.0", + "league/flysystem-ftp": "^3.0", + "league/flysystem-sftp-v3": "^3.0", + "mockery/mockery": "^1.4.4", + "orchestra/testbench-core": "^7.1", + "pda/pheanstalk": "^4.0", + "phpstan/phpstan": "^1.4.7", + "phpunit/phpunit": "^9.5.8", + "predis/predis": "^1.1.9", + "symfony/cache": "^6.0" + }, + "suggest": { + "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.198.1).", + "brianium/paratest": "Required to run tests in parallel (^6.0).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.4).", + "ext-bcmath": "Required to use the multiple_of validation rule.", + "ext-ftp": "Required to use the Flysystem FTP driver.", + "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", + "ext-memcached": "Required to use the memcache cache driver.", + "ext-pcntl": "Required to use all features of the queue worker.", + "ext-posix": "Required to use all features of the queue worker.", + "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", + "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", + "filp/whoops": "Required for friendly error pages in development (^2.14.3).", + "guzzlehttp/guzzle": "Required to use the HTTP Client and the ping methods on schedules (^7.2).", + "laravel/tinker": "Required to use the tinker console command (^2.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).", + "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.0).", + "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).", + "mockery/mockery": "Required to use mocking (^1.4.4).", + "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", + "phpunit/phpunit": "Required to use assertions and run tests (^9.5.8).", + "predis/predis": "Required to use the predis connector (^1.1.9).", + "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^6.0).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^6.0).", + "symfony/http-client": "Required to enable support for the Symfony API mail transports (^6.0).", + "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^6.0).", + "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^6.0).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.x-dev" + } + }, + "autoload": { + "files": [ + "src/Illuminate/Collections/helpers.php", + "src/Illuminate/Events/functions.php", + "src/Illuminate/Foundation/helpers.php", + "src/Illuminate/Support/helpers.php" + ], + "psr-4": { + "Illuminate\\": "src/Illuminate/", + "Illuminate\\Support\\": [ + "src/Illuminate/Macroable/", + "src/Illuminate/Collections/", + "src/Illuminate/Conditionable/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Laravel Framework.", + "homepage": "https://laravel.com", + "keywords": [ + "framework", + "laravel" + ], + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2022-06-07T15:09:32+00:00" + }, + { + "name": "laravel/sanctum", + "version": "v2.15.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/sanctum.git", + "reference": "31fbe6f85aee080c4dc2f9b03dc6dd5d0ee72473" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/sanctum/zipball/31fbe6f85aee080c4dc2f9b03dc6dd5d0ee72473", + "reference": "31fbe6f85aee080c4dc2f9b03dc6dd5d0ee72473", + "shasum": "" + }, + "require": { + "ext-json": "*", + "illuminate/console": "^6.9|^7.0|^8.0|^9.0", + "illuminate/contracts": "^6.9|^7.0|^8.0|^9.0", + "illuminate/database": "^6.9|^7.0|^8.0|^9.0", + "illuminate/support": "^6.9|^7.0|^8.0|^9.0", + "php": "^7.2|^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "orchestra/testbench": "^4.0|^5.0|^6.0|^7.0", + "phpunit/phpunit": "^8.0|^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Sanctum\\SanctumServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Sanctum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.", + "keywords": [ + "auth", + "laravel", + "sanctum" + ], + "support": { + "issues": "https://github.com/laravel/sanctum/issues", + "source": "https://github.com/laravel/sanctum" + }, + "time": "2022-04-08T13:39:49+00:00" + }, + { + "name": "laravel/serializable-closure", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/serializable-closure.git", + "reference": "09f0e9fb61829f628205b7c94906c28740ff9540" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/09f0e9fb61829f628205b7c94906c28740ff9540", + "reference": "09f0e9fb61829f628205b7c94906c28740ff9540", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "pestphp/pest": "^1.18", + "phpstan/phpstan": "^0.12.98", + "symfony/var-dumper": "^5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\SerializableClosure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Nuno Maduro", + "email": "nuno@laravel.com" + } + ], + "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", + "keywords": [ + "closure", + "laravel", + "serializable" + ], + "support": { + "issues": "https://github.com/laravel/serializable-closure/issues", + "source": "https://github.com/laravel/serializable-closure" + }, + "time": "2022-05-16T17:09:47+00:00" + }, + { + "name": "laravel/tinker", + "version": "v2.7.2", + "source": { + "type": "git", + "url": "https://github.com/laravel/tinker.git", + "reference": "dff39b661e827dae6e092412f976658df82dbac5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/tinker/zipball/dff39b661e827dae6e092412f976658df82dbac5", + "reference": "dff39b661e827dae6e092412f976658df82dbac5", + "shasum": "" + }, + "require": { + "illuminate/console": "^6.0|^7.0|^8.0|^9.0", + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0", + "php": "^7.2.5|^8.0", + "psy/psysh": "^0.10.4|^0.11.1", + "symfony/var-dumper": "^4.3.4|^5.0|^6.0" + }, + "require-dev": { + "mockery/mockery": "~1.3.3|^1.4.2", + "phpunit/phpunit": "^8.5.8|^9.3.3" + }, + "suggest": { + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Tinker\\TinkerServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Tinker\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Powerful REPL for the Laravel framework.", + "keywords": [ + "REPL", + "Tinker", + "laravel", + "psysh" + ], + "support": { + "issues": "https://github.com/laravel/tinker/issues", + "source": "https://github.com/laravel/tinker/tree/v2.7.2" + }, + "time": "2022-03-23T12:38:24+00:00" + }, + { + "name": "league/commonmark", + "version": "2.3.3", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/commonmark.git", + "reference": "0da1dca5781dd3cfddbe328224d9a7a62571addc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/0da1dca5781dd3cfddbe328224d9a7a62571addc", + "reference": "0da1dca5781dd3cfddbe328224d9a7a62571addc", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "league/config": "^1.1.1", + "php": "^7.4 || ^8.0", + "psr/event-dispatcher": "^1.0", + "symfony/deprecation-contracts": "^2.1 || ^3.0", + "symfony/polyfill-php80": "^1.16" + }, + "require-dev": { + "cebe/markdown": "^1.0", + "commonmark/cmark": "0.30.0", + "commonmark/commonmark.js": "0.30.0", + "composer/package-versions-deprecated": "^1.8", + "embed/embed": "^4.4", + "erusev/parsedown": "^1.0", + "ext-json": "*", + "github/gfm": "0.29.0", + "michelf/php-markdown": "^1.4", + "nyholm/psr7": "^1.5", + "phpstan/phpstan": "^0.12.88 || ^1.0.0", + "phpunit/phpunit": "^9.5.5", + "scrutinizer/ocular": "^1.8.1", + "symfony/finder": "^5.3", + "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0", + "unleashedtech/php-coding-standard": "^3.1", + "vimeo/psalm": "^4.7.3" + }, + "suggest": { + "symfony/yaml": "v2.3+ required if using the Front Matter extension" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.4-dev" + } + }, + "autoload": { + "psr-4": { + "League\\CommonMark\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)", + "homepage": "https://commonmark.thephpleague.com", + "keywords": [ + "commonmark", + "flavored", + "gfm", + "github", + "github-flavored", + "markdown", + "md", + "parser" + ], + "support": { + "docs": "https://commonmark.thephpleague.com/", + "forum": "https://github.com/thephpleague/commonmark/discussions", + "issues": "https://github.com/thephpleague/commonmark/issues", + "rss": "https://github.com/thephpleague/commonmark/releases.atom", + "source": "https://github.com/thephpleague/commonmark" + }, + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/commonmark", + "type": "tidelift" + } + ], + "time": "2022-06-07T21:28:26+00:00" + }, + { + "name": "league/config", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/config.git", + "reference": "a9d39eeeb6cc49d10a6e6c36f22c4c1f4a767f3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/config/zipball/a9d39eeeb6cc49d10a6e6c36f22c4c1f4a767f3e", + "reference": "a9d39eeeb6cc49d10a6e6c36f22c4c1f4a767f3e", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^3.0.1", + "nette/schema": "^1.2", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.90", + "phpunit/phpunit": "^9.5.5", + "scrutinizer/ocular": "^1.8.1", + "unleashedtech/php-coding-standard": "^3.1", + "vimeo/psalm": "^4.7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Config\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Define configuration arrays with strict schemas and access values with dot notation", + "homepage": "https://config.thephpleague.com", + "keywords": [ + "array", + "config", + "configuration", + "dot", + "dot-access", + "nested", + "schema" + ], + "support": { + "docs": "https://config.thephpleague.com/", + "issues": "https://github.com/thephpleague/config/issues", + "rss": "https://github.com/thephpleague/config/releases.atom", + "source": "https://github.com/thephpleague/config" + }, + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + } + ], + "time": "2021-08-14T12:15:32+00:00" + }, + { + "name": "league/flysystem", + "version": "3.0.21", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "8f1fcf9d2304ff77a006aa36dd2cb5f236999b12" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/8f1fcf9d2304ff77a006aa36dd2cb5f236999b12", + "reference": "8f1fcf9d2304ff77a006aa36dd2cb5f236999b12", + "shasum": "" + }, + "require": { + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "conflict": { + "aws/aws-sdk-php": "3.209.31 || 3.210.0", + "guzzlehttp/guzzle": "<7.0", + "guzzlehttp/ringphp": "<1.1.1", + "symfony/http-client": "<5.2" + }, + "require-dev": { + "async-aws/s3": "^1.5", + "async-aws/simple-s3": "^1.0", + "aws/aws-sdk-php": "^3.198.1", + "composer/semver": "^3.0", + "ext-fileinfo": "*", + "ext-ftp": "*", + "ext-zip": "*", + "friendsofphp/php-cs-fixer": "^3.5", + "google/cloud-storage": "^1.23", + "microsoft/azure-storage-blob": "^1.1", + "phpseclib/phpseclib": "^2.0", + "phpstan/phpstan": "^0.12.26", + "phpunit/phpunit": "^9.5.11", + "sabre/dav": "^4.3.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "File storage abstraction for PHP", + "keywords": [ + "WebDAV", + "aws", + "cloud", + "file", + "files", + "filesystem", + "filesystems", + "ftp", + "s3", + "sftp", + "storage" + ], + "support": { + "issues": "https://github.com/thephpleague/flysystem/issues", + "source": "https://github.com/thephpleague/flysystem/tree/3.0.21" + }, + "funding": [ + { + "url": "https://offset.earth/frankdejonge", + "type": "custom" + }, + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2022-06-12T17:54:28+00:00" + }, + { + "name": "league/mime-type-detection", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/mime-type-detection.git", + "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.2", + "phpstan/phpstan": "^0.12.68", + "phpunit/phpunit": "^8.5.8 || ^9.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\MimeTypeDetection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Mime-type detection for Flysystem", + "support": { + "issues": "https://github.com/thephpleague/mime-type-detection/issues", + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0" + }, + "funding": [ + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2022-04-17T13:12:02+00:00" + }, + { + "name": "monolog/monolog", + "version": "2.7.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "5579edf28aee1190a798bfa5be8bc16c563bd524" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/5579edf28aee1190a798bfa5be8bc16c563bd524", + "reference": "5579edf28aee1190a798bfa5be8bc16c563bd524", + "shasum": "" + }, + "require": { + "php": ">=7.2", + "psr/log": "^1.0.1 || ^2.0 || ^3.0" + }, + "provide": { + "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "doctrine/couchdb": "~1.0@dev", + "elasticsearch/elasticsearch": "^7 || ^8", + "ext-json": "*", + "graylog2/gelf-php": "^1.4.2", + "guzzlehttp/guzzle": "^7.4", + "guzzlehttp/psr7": "^2.2", + "mongodb/mongodb": "^1.8", + "php-amqplib/php-amqplib": "~2.4 || ^3", + "php-console/php-console": "^3.1.3", + "phpspec/prophecy": "^1.15", + "phpstan/phpstan": "^0.12.91", + "phpunit/phpunit": "^8.5.14", + "predis/predis": "^1.1", + "rollbar/rollbar": "^1.3 || ^2 || ^3", + "ruflin/elastica": "^7", + "swiftmailer/swiftmailer": "^5.3|^6.0", + "symfony/mailer": "^5.4 || ^6", + "symfony/mime": "^5.4 || ^6" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", + "ext-mbstring": "Allow to work properly with unicode symbols", + "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", + "ext-openssl": "Required to send log messages using SSL", + "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "https://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "support": { + "issues": "https://github.com/Seldaek/monolog/issues", + "source": "https://github.com/Seldaek/monolog/tree/2.7.0" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "time": "2022-06-09T08:59:12+00:00" + }, + { + "name": "nesbot/carbon", + "version": "2.58.0", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "97a34af22bde8d0ac20ab34b29d7bfe360902055" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/97a34af22bde8d0ac20ab34b29d7bfe360902055", + "reference": "97a34af22bde8d0ac20ab34b29d7bfe360902055", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.1.8 || ^8.0", + "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-php80": "^1.16", + "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" + }, + "require-dev": { + "doctrine/dbal": "^2.0 || ^3.0", + "doctrine/orm": "^2.7", + "friendsofphp/php-cs-fixer": "^3.0", + "kylekatarnls/multi-tester": "^2.0", + "phpmd/phpmd": "^2.9", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.54 || ^1.0", + "phpunit/php-file-iterator": "^2.0.5", + "phpunit/phpunit": "^7.5.20 || ^8.5.23", + "squizlabs/php_codesniffer": "^3.4" + }, + "bin": [ + "bin/carbon" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-3.x": "3.x-dev", + "dev-master": "2.x-dev" + }, + "laravel": { + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "https://markido.com" + }, + { + "name": "kylekatarnls", + "homepage": "https://github.com/kylekatarnls" + } + ], + "description": "An API extension for DateTime that supports 281 different languages.", + "homepage": "https://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "support": { + "docs": "https://carbon.nesbot.com/docs", + "issues": "https://github.com/briannesbitt/Carbon/issues", + "source": "https://github.com/briannesbitt/Carbon" + }, + "funding": [ + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "time": "2022-04-25T19:31:17+00:00" + }, + { + "name": "nette/schema", + "version": "v1.2.2", + "source": { + "type": "git", + "url": "https://github.com/nette/schema.git", + "reference": "9a39cef03a5b34c7de64f551538cbba05c2be5df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/schema/zipball/9a39cef03a5b34c7de64f551538cbba05c2be5df", + "reference": "9a39cef03a5b34c7de64f551538cbba05c2be5df", + "shasum": "" + }, + "require": { + "nette/utils": "^2.5.7 || ^3.1.5 || ^4.0", + "php": ">=7.1 <8.2" + }, + "require-dev": { + "nette/tester": "^2.3 || ^2.4", + "phpstan/phpstan-nette": "^0.12", + "tracy/tracy": "^2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "📐 Nette Schema: validating data structures against a given Schema.", + "homepage": "https://nette.org", + "keywords": [ + "config", + "nette" + ], + "support": { + "issues": "https://github.com/nette/schema/issues", + "source": "https://github.com/nette/schema/tree/v1.2.2" + }, + "time": "2021-10-15T11:40:02+00:00" + }, + { + "name": "nette/utils", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/nette/utils.git", + "reference": "0af4e3de4df9f1543534beab255ccf459e7a2c99" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/utils/zipball/0af4e3de4df9f1543534beab255ccf459e7a2c99", + "reference": "0af4e3de4df9f1543534beab255ccf459e7a2c99", + "shasum": "" + }, + "require": { + "php": ">=7.2 <8.2" + }, + "conflict": { + "nette/di": "<3.0.6" + }, + "require-dev": { + "nette/tester": "~2.0", + "phpstan/phpstan": "^1.0", + "tracy/tracy": "^2.3" + }, + "suggest": { + "ext-gd": "to use Image", + "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()", + "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", + "ext-json": "to use Nette\\Utils\\Json", + "ext-mbstring": "to use Strings::lower() etc...", + "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()", + "ext-xml": "to use Strings::length() etc. when mbstring is not available" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", + "homepage": "https://nette.org", + "keywords": [ + "array", + "core", + "datetime", + "images", + "json", + "nette", + "paginator", + "password", + "slugify", + "string", + "unicode", + "utf-8", + "utility", + "validation" + ], + "support": { + "issues": "https://github.com/nette/utils/issues", + "source": "https://github.com/nette/utils/tree/v3.2.7" + }, + "time": "2022-01-24T11:29:14+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.14.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", + "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" + }, + "time": "2022-05-31T20:59:12+00:00" + }, + { + "name": "phpoption/phpoption", + "version": "1.8.1", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15", + "reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19 || ^9.5.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8-dev" + } + }, + "autoload": { + "psr-4": { + "PhpOption\\": "src/PhpOption/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" + }, + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "support": { + "issues": "https://github.com/schmittjoh/php-option/issues", + "source": "https://github.com/schmittjoh/php-option/tree/1.8.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" + } + ], + "time": "2021-12-04T23:24:31+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client/tree/master" + }, + "time": "2020-06-29T06:28:15+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory/tree/master" + }, + "time": "2019-04-30T12:38:16+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "psr/log", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.0" + }, + "time": "2021-07-14T16:46:02+00:00" + }, + { + "name": "psr/simple-cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" + }, + "time": "2021-10-29T13:26:27+00:00" + }, + { + "name": "psy/psysh", + "version": "v0.11.5", + "source": { + "type": "git", + "url": "https://github.com/bobthecow/psysh.git", + "reference": "c23686f9c48ca202710dbb967df8385a952a2daf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/c23686f9c48ca202710dbb967df8385a952a2daf", + "reference": "c23686f9c48ca202710dbb967df8385a952a2daf", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-tokenizer": "*", + "nikic/php-parser": "^4.0 || ^3.1", + "php": "^8.0 || ^7.0.8", + "symfony/console": "^6.0 || ^5.0 || ^4.0 || ^3.4", + "symfony/var-dumper": "^6.0 || ^5.0 || ^4.0 || ^3.4" + }, + "conflict": { + "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.2" + }, + "suggest": { + "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", + "ext-pdo-sqlite": "The doc command requires SQLite to work.", + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", + "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history." + }, + "bin": [ + "bin/psysh" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.11.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Psy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Justin Hileman", + "email": "justin@justinhileman.info", + "homepage": "http://justinhileman.com" + } + ], + "description": "An interactive shell for modern PHP.", + "homepage": "http://psysh.org", + "keywords": [ + "REPL", + "console", + "interactive", + "shell" + ], + "support": { + "issues": "https://github.com/bobthecow/psysh/issues", + "source": "https://github.com/bobthecow/psysh/tree/v0.11.5" + }, + "time": "2022-05-27T18:03:49+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "ramsey/collection", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/ramsey/collection.git", + "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/collection/zipball/cccc74ee5e328031b15640b51056ee8d3bb66c0a", + "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a", + "shasum": "" + }, + "require": { + "php": "^7.3 || ^8", + "symfony/polyfill-php81": "^1.23" + }, + "require-dev": { + "captainhook/captainhook": "^5.3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "ergebnis/composer-normalize": "^2.6", + "fakerphp/faker": "^1.5", + "hamcrest/hamcrest-php": "^2", + "jangregor/phpstan-prophecy": "^0.8", + "mockery/mockery": "^1.3", + "phpspec/prophecy-phpunit": "^2.0", + "phpstan/extension-installer": "^1", + "phpstan/phpstan": "^0.12.32", + "phpstan/phpstan-mockery": "^0.12.5", + "phpstan/phpstan-phpunit": "^0.12.11", + "phpunit/phpunit": "^8.5 || ^9", + "psy/psysh": "^0.10.4", + "slevomat/coding-standard": "^6.3", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ramsey\\Collection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "description": "A PHP library for representing and manipulating collections.", + "keywords": [ + "array", + "collection", + "hash", + "map", + "queue", + "set" + ], + "support": { + "issues": "https://github.com/ramsey/collection/issues", + "source": "https://github.com/ramsey/collection/tree/1.2.2" + }, + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/collection", + "type": "tidelift" + } + ], + "time": "2021-10-10T03:01:02+00:00" + }, + { + "name": "ramsey/uuid", + "version": "4.3.1", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid.git", + "reference": "8505afd4fea63b81a85d3b7b53ac3cb8dc347c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/8505afd4fea63b81a85d3b7b53ac3cb8dc347c28", + "reference": "8505afd4fea63b81a85d3b7b53ac3cb8dc347c28", + "shasum": "" + }, + "require": { + "brick/math": "^0.8 || ^0.9", + "ext-ctype": "*", + "ext-json": "*", + "php": "^8.0", + "ramsey/collection": "^1.0" + }, + "replace": { + "rhumsaa/uuid": "self.version" + }, + "require-dev": { + "captainhook/captainhook": "^5.10", + "captainhook/plugin-composer": "^5.3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "doctrine/annotations": "^1.8", + "ergebnis/composer-normalize": "^2.15", + "mockery/mockery": "^1.3", + "moontoast/math": "^1.1", + "paragonie/random-lib": "^2", + "php-mock/php-mock": "^2.2", + "php-mock/php-mock-mockery": "^1.3", + "php-parallel-lint/php-parallel-lint": "^1.1", + "phpbench/phpbench": "^1.0", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-mockery": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^8.5 || ^9", + "slevomat/coding-standard": "^7.0", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.9" + }, + "suggest": { + "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", + "ext-ctype": "Enables faster processing of character classification using ctype functions.", + "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", + "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", + "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", + "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + }, + "type": "library", + "extra": { + "captainhook": { + "force-install": true + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Ramsey\\Uuid\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", + "keywords": [ + "guid", + "identifier", + "uuid" + ], + "support": { + "issues": "https://github.com/ramsey/uuid/issues", + "source": "https://github.com/ramsey/uuid/tree/4.3.1" + }, + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid", + "type": "tidelift" + } + ], + "time": "2022-03-27T21:42:02+00:00" + }, + { + "name": "symfony/console", + "version": "v6.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "6187424023fbffcd757789aeb517c9161b1eabee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/6187424023fbffcd757789aeb517c9161b1eabee", + "reference": "6187424023fbffcd757789aeb517c9161b1eabee", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.4|^6.0" + }, + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v6.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-06-08T14:02:09+00:00" + }, + { + "name": "symfony/css-selector", + "version": "v6.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "05c40f02f621609404b8820ff8bc39acb46e19cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/05c40f02f621609404b8820ff8bc39acb46e19cf", + "reference": "05c40f02f621609404b8820ff8bc39acb46e19cf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Converts CSS selectors to XPath expressions", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/css-selector/tree/v6.1.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-02-25T11:15:52+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918", + "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.1.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-02-25T11:15:52+00:00" + }, + { + "name": "symfony/error-handler", + "version": "v6.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/error-handler.git", + "reference": "d02c662651e5de760bb7d5e94437113309e8f8a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/d02c662651e5de760bb7d5e94437113309e8f8a0", + "reference": "d02c662651e5de760bb7d5e94437113309e8f8a0", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/log": "^1|^2|^3", + "symfony/var-dumper": "^5.4|^6.0" + }, + "require-dev": { + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/http-kernel": "^5.4|^6.0", + "symfony/serializer": "^5.4|^6.0" + }, + "bin": [ + "Resources/bin/patch-type-declarations" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\ErrorHandler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to manage errors and ease debugging PHP code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/error-handler/tree/v6.1.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-23T10:32:57+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v6.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "a0449a7ad7daa0f7c0acd508259f80544ab5a347" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a0449a7ad7daa0f7c0acd508259f80544ab5a347", + "reference": "a0449a7ad7daa0f7c0acd508259f80544ab5a347", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/event-dispatcher-contracts": "^2|^3" + }, + "conflict": { + "symfony/dependency-injection": "<5.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/error-handler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/stopwatch": "^5.4|^6.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v6.1.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-05T16:51:07+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v3.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "02ff5eea2f453731cfbc6bc215e456b781480448" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/02ff5eea2f453731cfbc6bc215e456b781480448", + "reference": "02ff5eea2f453731cfbc6bc215e456b781480448", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/event-dispatcher": "^1" + }, + "suggest": { + "symfony/event-dispatcher-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.1.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-02-25T11:15:52+00:00" + }, + { + "name": "symfony/finder", + "version": "v6.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "45b8beb69d6eb3b05a65689ebfd4222326773f8f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/45b8beb69d6eb3b05a65689ebfd4222326773f8f", + "reference": "45b8beb69d6eb3b05a65689ebfd4222326773f8f", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "symfony/filesystem": "^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v6.1.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-04-15T08:08:08+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v6.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "a58dc88d56e04e57993d96c1407a17407610e1df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/a58dc88d56e04e57993d96c1407a17407610e1df", + "reference": "a58dc88d56e04e57993d96c1407a17407610e1df", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "predis/predis": "~1.0", + "symfony/cache": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/mime": "^5.4|^6.0" + }, + "suggest": { + "symfony/mime": "To use the file extension guesser" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Defines an object-oriented layer for the HTTP specification", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-foundation/tree/v6.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-31T14:28:03+00:00" + }, + { + "name": "symfony/http-kernel", + "version": "v6.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "86c4d6f6c5b6cd012df41e3b950c924b3ffdc019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/86c4d6f6c5b6cd012df41e3b950c924b3ffdc019", + "reference": "86c4d6f6c5b6cd012df41e3b950c924b3ffdc019", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/log": "^1|^2|^3", + "symfony/error-handler": "^6.1", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/browser-kit": "<5.4", + "symfony/cache": "<5.4", + "symfony/config": "<6.1", + "symfony/console": "<5.4", + "symfony/dependency-injection": "<6.1", + "symfony/doctrine-bridge": "<5.4", + "symfony/form": "<5.4", + "symfony/http-client": "<5.4", + "symfony/mailer": "<5.4", + "symfony/messenger": "<5.4", + "symfony/translation": "<5.4", + "symfony/twig-bridge": "<5.4", + "symfony/validator": "<5.4", + "twig/twig": "<2.13" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/cache": "^1.0|^2.0|^3.0", + "symfony/browser-kit": "^5.4|^6.0", + "symfony/config": "^6.1", + "symfony/console": "^5.4|^6.0", + "symfony/css-selector": "^5.4|^6.0", + "symfony/dependency-injection": "^6.1", + "symfony/dom-crawler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/http-client-contracts": "^1.1|^2|^3", + "symfony/process": "^5.4|^6.0", + "symfony/routing": "^5.4|^6.0", + "symfony/stopwatch": "^5.4|^6.0", + "symfony/translation": "^5.4|^6.0", + "symfony/translation-contracts": "^1.1|^2|^3", + "symfony/uid": "^5.4|^6.0", + "twig/twig": "^2.13|^3.0.4" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a structured process for converting a Request into a Response", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-kernel/tree/v6.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-06-09T17:31:33+00:00" + }, + { + "name": "symfony/mailer", + "version": "v6.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/mailer.git", + "reference": "db6a19a5c896139901c2de59fc9849379e0ff3b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/mailer/zipball/db6a19a5c896139901c2de59fc9849379e0ff3b6", + "reference": "db6a19a5c896139901c2de59fc9849379e0ff3b6", + "shasum": "" + }, + "require": { + "egulias/email-validator": "^2.1.10|^3", + "php": ">=8.1", + "psr/event-dispatcher": "^1", + "psr/log": "^1|^2|^3", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/mime": "^5.4|^6.0", + "symfony/service-contracts": "^1.1|^2|^3" + }, + "conflict": { + "symfony/http-kernel": "<5.4" + }, + "require-dev": { + "symfony/http-client-contracts": "^1.1|^2|^3", + "symfony/messenger": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Mailer\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Helps sending emails", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/mailer/tree/v6.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-06-06T19:15:01+00:00" + }, + { + "name": "symfony/mime", + "version": "v6.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/mime.git", + "reference": "56508865dd883dce3c863af11b3e8053adab30d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/mime/zipball/56508865dd883dce3c863af11b3e8053adab30d7", + "reference": "56508865dd883dce3c863af11b3e8053adab30d7", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" + }, + "conflict": { + "egulias/email-validator": "~3.0.0", + "phpdocumentor/reflection-docblock": "<3.2.2", + "phpdocumentor/type-resolver": "<1.4.0", + "symfony/mailer": "<5.4" + }, + "require-dev": { + "egulias/email-validator": "^2.1.10|^3.1", + "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/property-access": "^5.4|^6.0", + "symfony/property-info": "^5.4|^6.0", + "symfony/serializer": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Mime\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows manipulating MIME messages", + "homepage": "https://symfony.com", + "keywords": [ + "mime", + "mime-type" + ], + "support": { + "source": "https://github.com/symfony/mime/tree/v6.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-06-09T12:51:38+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-24T11:49:31+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "433d05519ce6990bf3530fba6957499d327395c2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", + "reference": "433d05519ce6990bf3530fba6957499d327395c2", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-24T11:49:31+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-24T11:49:31+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "219aa369ceff116e673852dce47c3a41794c14bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", + "reference": "219aa369ceff116e673852dce47c3a41794c14bd", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-24T11:49:31+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-24T11:49:31+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2", + "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-24T11:49:31+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-10T07:21:04+00:00" + }, + { + "name": "symfony/polyfill-php81", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1", + "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-24T11:49:31+00:00" + }, + { + "name": "symfony/process", + "version": "v6.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "318718453c2be58266f1a9e74063d13cb8dd4165" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/318718453c2be58266f1a9e74063d13cb8dd4165", + "reference": "318718453c2be58266f1a9e74063d13cb8dd4165", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v6.1.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-11T12:12:29+00:00" + }, + { + "name": "symfony/routing", + "version": "v6.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "8f068b792e515b25e26855ac8dc7fe800399f3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/8f068b792e515b25e26855ac8dc7fe800399f3e5", + "reference": "8f068b792e515b25e26855ac8dc7fe800399f3e5", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "conflict": { + "doctrine/annotations": "<1.12", + "symfony/config": "<5.4", + "symfony/dependency-injection": "<5.4", + "symfony/yaml": "<5.4" + }, + "require-dev": { + "doctrine/annotations": "^1.12", + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0" + }, + "suggest": { + "symfony/config": "For using the all-in-one router or any loader", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Maps an HTTP request to a set of configuration variables", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "support": { + "source": "https://github.com/symfony/routing/tree/v6.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-06-08T12:21:15+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "d66cd8ab656780f62c4215b903a420eb86358957" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d66cd8ab656780f62c4215b903a420eb86358957", + "reference": "d66cd8ab656780f62c4215b903a420eb86358957", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^2.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.1.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-07T08:07:09+00:00" + }, + { + "name": "symfony/string", + "version": "v6.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "d3edc75baf9f1d4f94879764dda2e1ac33499529" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/d3edc75baf9f1d4f94879764dda2e1ac33499529", + "reference": "d3edc75baf9f1d4f94879764dda2e1ac33499529", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.0" + }, + "require-dev": { + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v6.1.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-04-22T08:18:23+00:00" + }, + { + "name": "symfony/translation", + "version": "v6.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "b254416631615bc6fe49b0a67f18658827288147" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/b254416631615bc6fe49b0a67f18658827288147", + "reference": "b254416631615bc6fe49b0a67f18658827288147", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-mbstring": "~1.0", + "symfony/translation-contracts": "^2.3|^3.0" + }, + "conflict": { + "symfony/config": "<5.4", + "symfony/console": "<5.4", + "symfony/dependency-injection": "<5.4", + "symfony/http-kernel": "<5.4", + "symfony/twig-bundle": "<5.4", + "symfony/yaml": "<5.4" + }, + "provide": { + "symfony/translation-implementation": "2.3|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/console": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/http-client-contracts": "^1.1|^2.0|^3.0", + "symfony/http-kernel": "^5.4|^6.0", + "symfony/intl": "^5.4|^6.0", + "symfony/polyfill-intl-icu": "^1.21", + "symfony/routing": "^5.4|^6.0", + "symfony/service-contracts": "^1.1.2|^2|^3", + "symfony/yaml": "^5.4|^6.0" + }, + "suggest": { + "psr/log-implementation": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to internationalize your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/translation/tree/v6.1.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-11T12:12:29+00:00" + }, + { + "name": "symfony/translation-contracts", + "version": "v3.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "bfddd2a1faa271b782b791c361cc16e2dd49dfaa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/bfddd2a1faa271b782b791c361cc16e2dd49dfaa", + "reference": "bfddd2a1faa271b782b791c361cc16e2dd49dfaa", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "suggest": { + "symfony/translation-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/v3.1.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-04-22T07:30:54+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v6.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "98587d939cb783aa04e828e8fa857edaca24c212" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/98587d939cb783aa04e828e8fa857edaca24c212", + "reference": "98587d939cb783aa04e828e8fa857edaca24c212", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "phpunit/phpunit": "<5.4.3", + "symfony/console": "<5.4" + }, + "require-dev": { + "ext-iconv": "*", + "symfony/console": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/uid": "^5.4|^6.0", + "twig/twig": "^2.13|^3.0.4" + }, + "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", + "ext-intl": "To show region name in time zone dump", + "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" + }, + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v6.1.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-21T13:34:40+00:00" + }, + { + "name": "tijsverkoyen/css-to-inline-styles", + "version": "2.2.4", + "source": { + "type": "git", + "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", + "reference": "da444caae6aca7a19c0c140f68c6182e337d5b1c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/da444caae6aca7a19c0c140f68c6182e337d5b1c", + "reference": "da444caae6aca7a19c0c140f68c6182e337d5b1c", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "php": "^5.5 || ^7.0 || ^8.0", + "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5 || ^8.5.21 || ^9.5.10" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "TijsVerkoyen\\CssToInlineStyles\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Tijs Verkoyen", + "email": "css_to_inline_styles@verkoyen.eu", + "role": "Developer" + } + ], + "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", + "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", + "support": { + "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", + "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.4" + }, + "time": "2021-12-08T09:12:39+00:00" + }, + { + "name": "vlucas/phpdotenv", + "version": "v5.4.1", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "264dce589e7ce37a7ba99cb901eed8249fbec92f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/264dce589e7ce37a7ba99cb901eed8249fbec92f", + "reference": "264dce589e7ce37a7ba99cb901eed8249fbec92f", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "graham-campbell/result-type": "^1.0.2", + "php": "^7.1.3 || ^8.0", + "phpoption/phpoption": "^1.8", + "symfony/polyfill-ctype": "^1.23", + "symfony/polyfill-mbstring": "^1.23.1", + "symfony/polyfill-php80": "^1.23.1" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "ext-filter": "*", + "phpunit/phpunit": "^7.5.20 || ^8.5.21 || ^9.5.10" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "https://github.com/vlucas" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "support": { + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v5.4.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "time": "2021-12-12T23:22:04+00:00" + }, + { + "name": "voku/portable-ascii", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/voku/portable-ascii.git", + "reference": "b56450eed252f6801410d810c8e1727224ae0743" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/b56450eed252f6801410d810c8e1727224ae0743", + "reference": "b56450eed252f6801410d810c8e1727224ae0743", + "shasum": "" + }, + "require": { + "php": ">=7.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~6.0 || ~7.0 || ~9.0" + }, + "suggest": { + "ext-intl": "Use Intl for transliterator_transliterate() support" + }, + "type": "library", + "autoload": { + "psr-4": { + "voku\\": "src/voku/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lars Moelleken", + "homepage": "http://www.moelleken.org/" + } + ], + "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", + "homepage": "https://github.com/voku/portable-ascii", + "keywords": [ + "ascii", + "clean", + "php" + ], + "support": { + "issues": "https://github.com/voku/portable-ascii/issues", + "source": "https://github.com/voku/portable-ascii/tree/2.0.1" + }, + "funding": [ + { + "url": "https://www.paypal.me/moelleken", + "type": "custom" + }, + { + "url": "https://github.com/voku", + "type": "github" + }, + { + "url": "https://opencollective.com/portable-ascii", + "type": "open_collective" + }, + { + "url": "https://www.patreon.com/voku", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii", + "type": "tidelift" + } + ], + "time": "2022-03-08T17:03:00+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.22" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-03-03T08:28:38+00:00" + }, + { + "name": "facade/ignition-contracts", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/facade/ignition-contracts.git", + "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/3c921a1cdba35b68a7f0ccffc6dffc1995b18267", + "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^v2.15.8", + "phpunit/phpunit": "^9.3.11", + "vimeo/psalm": "^3.17.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Facade\\IgnitionContracts\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://flareapp.io", + "role": "Developer" + } + ], + "description": "Solution contracts for Ignition", + "homepage": "https://github.com/facade/ignition-contracts", + "keywords": [ + "contracts", + "flare", + "ignition" + ], + "support": { + "issues": "https://github.com/facade/ignition-contracts/issues", + "source": "https://github.com/facade/ignition-contracts/tree/1.0.2" + }, + "time": "2020-10-16T08:27:54+00:00" + }, + { + "name": "fakerphp/faker", + "version": "v1.19.0", + "source": { + "type": "git", + "url": "https://github.com/FakerPHP/Faker.git", + "reference": "d7f08a622b3346766325488aa32ddc93ccdecc75" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/d7f08a622b3346766325488aa32ddc93ccdecc75", + "reference": "d7f08a622b3346766325488aa32ddc93ccdecc75", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "psr/container": "^1.0 || ^2.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "conflict": { + "fzaninotto/faker": "*" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "doctrine/persistence": "^1.3 || ^2.0", + "ext-intl": "*", + "symfony/phpunit-bridge": "^4.4 || ^5.2" + }, + "suggest": { + "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", + "ext-curl": "Required by Faker\\Provider\\Image to download images.", + "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.", + "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", + "ext-mbstring": "Required for multibyte Unicode string functionality." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "v1.19-dev" + } + }, + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "support": { + "issues": "https://github.com/FakerPHP/Faker/issues", + "source": "https://github.com/FakerPHP/Faker/tree/v1.19.0" + }, + "time": "2022-02-02T17:38:57+00:00" + }, + { + "name": "filp/whoops", + "version": "2.14.5", + "source": { + "type": "git", + "url": "https://github.com/filp/whoops.git", + "reference": "a63e5e8f26ebbebf8ed3c5c691637325512eb0dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filp/whoops/zipball/a63e5e8f26ebbebf8ed3c5c691637325512eb0dc", + "reference": "a63e5e8f26ebbebf8ed3c5c691637325512eb0dc", + "shasum": "" + }, + "require": { + "php": "^5.5.9 || ^7.0 || ^8.0", + "psr/log": "^1.0.1 || ^2.0 || ^3.0" + }, + "require-dev": { + "mockery/mockery": "^0.9 || ^1.0", + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", + "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" + }, + "suggest": { + "symfony/var-dumper": "Pretty print complex values better with var-dumper available", + "whoops/soap": "Formats errors as SOAP responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Whoops\\": "src/Whoops/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp", + "role": "Developer" + } + ], + "description": "php error handling for cool kids", + "homepage": "https://filp.github.io/whoops/", + "keywords": [ + "error", + "exception", + "handling", + "library", + "throwable", + "whoops" + ], + "support": { + "issues": "https://github.com/filp/whoops/issues", + "source": "https://github.com/filp/whoops/tree/2.14.5" + }, + "funding": [ + { + "url": "https://github.com/denis-sokolov", + "type": "github" + } + ], + "time": "2022-01-07T12:00:00+00:00" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "shasum": "" + }, + "require": { + "php": "^5.3|^7.0|^8.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "^1.4 || ^2.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" + }, + "time": "2020-07-09T08:09:16+00:00" + }, + { + "name": "laravel/sail", + "version": "v1.14.10", + "source": { + "type": "git", + "url": "https://github.com/laravel/sail.git", + "reference": "0ea5d683af4d189071efcdb9e83946c10dab82c3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/sail/zipball/0ea5d683af4d189071efcdb9e83946c10dab82c3", + "reference": "0ea5d683af4d189071efcdb9e83946c10dab82c3", + "shasum": "" + }, + "require": { + "illuminate/console": "^8.0|^9.0", + "illuminate/contracts": "^8.0|^9.0", + "illuminate/support": "^8.0|^9.0", + "php": "^7.3|^8.0" + }, + "bin": [ + "bin/sail" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Sail\\SailServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Sail\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Docker files for running a basic Laravel application.", + "keywords": [ + "docker", + "laravel" + ], + "support": { + "issues": "https://github.com/laravel/sail/issues", + "source": "https://github.com/laravel/sail" + }, + "time": "2022-06-09T07:10:28+00:00" + }, + { + "name": "mockery/mockery", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac", + "reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "^2.0.1", + "lib-pcre": ">=7.0", + "php": "^7.3 || ^8.0" + }, + "conflict": { + "phpunit/phpunit": "<8.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5 || ^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Mockery": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "support": { + "issues": "https://github.com/mockery/mockery/issues", + "source": "https://github.com/mockery/mockery/tree/1.5.0" + }, + "time": "2022-01-20T13:18:17+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2022-03-03T13:19:32+00:00" + }, + { + "name": "nunomaduro/collision", + "version": "v6.2.0", + "source": { + "type": "git", + "url": "https://github.com/nunomaduro/collision.git", + "reference": "c379636dc50e829edb3a8bcb944a01aa1aed8f25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/c379636dc50e829edb3a8bcb944a01aa1aed8f25", + "reference": "c379636dc50e829edb3a8bcb944a01aa1aed8f25", + "shasum": "" + }, + "require": { + "facade/ignition-contracts": "^1.0.2", + "filp/whoops": "^2.14.5", + "php": "^8.0.0", + "symfony/console": "^6.0.2" + }, + "require-dev": { + "brianium/paratest": "^6.4.1", + "laravel/framework": "^9.7", + "nunomaduro/larastan": "^1.0.2", + "nunomaduro/mock-final-classes": "^1.1.0", + "orchestra/testbench": "^7.3.0", + "phpunit/phpunit": "^9.5.11" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "6.x-dev" + }, + "laravel": { + "providers": [ + "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "NunoMaduro\\Collision\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Cli error handling for console/command-line PHP applications.", + "keywords": [ + "artisan", + "cli", + "command-line", + "console", + "error", + "handling", + "laravel", + "laravel-zero", + "php", + "symfony" + ], + "support": { + "issues": "https://github.com/nunomaduro/collision/issues", + "source": "https://github.com/nunomaduro/collision" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2022-04-05T15:31:38+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + }, + "time": "2021-10-19T17:43:47+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "77a32518733312af16a44300404e945338981de3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", + "reference": "77a32518733312af16a44300404e945338981de3", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*", + "psalm/phar": "^4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" + }, + "time": "2022-03-15T21:29:03+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.2", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0 || ^7.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" + }, + "time": "2021-12-08T12:19:24+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.15", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", + "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.13.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "*", + "ext-xdebug": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-03-07T09:28:20+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.5.20", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba", + "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.13", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^3.0", + "sebastian/version": "^3.0.2" + }, + "require-dev": { + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.5-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-04-01T12:37:26+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:49:45+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-04-03T09:37:03+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-11-11T14:18:36+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-02-14T08:28:10+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:17:30+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", + "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-03-15T09:54:48+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "spatie/backtrace", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/spatie/backtrace.git", + "reference": "4ee7d41aa5268107906ea8a4d9ceccde136dbd5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/backtrace/zipball/4ee7d41aa5268107906ea8a4d9ceccde136dbd5b", + "reference": "4ee7d41aa5268107906ea8a4d9ceccde136dbd5b", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "ext-json": "*", + "phpunit/phpunit": "^9.3", + "symfony/var-dumper": "^5.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\Backtrace\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van de Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "A better backtrace", + "homepage": "https://github.com/spatie/backtrace", + "keywords": [ + "Backtrace", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/backtrace/issues", + "source": "https://github.com/spatie/backtrace/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/sponsors/spatie", + "type": "github" + }, + { + "url": "https://spatie.be/open-source/support-us", + "type": "other" + } + ], + "time": "2021-11-09T10:57:15+00:00" + }, + { + "name": "spatie/flare-client-php", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/flare-client-php.git", + "reference": "86a380f5b1ce839af04a08f1c8f2697184cdf23f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/86a380f5b1ce839af04a08f1c8f2697184cdf23f", + "reference": "86a380f5b1ce839af04a08f1c8f2697184cdf23f", + "shasum": "" + }, + "require": { + "illuminate/pipeline": "^8.0|^9.0", + "php": "^8.0", + "spatie/backtrace": "^1.2", + "symfony/http-foundation": "^5.0|^6.0", + "symfony/mime": "^5.2|^6.0", + "symfony/process": "^5.2|^6.0", + "symfony/var-dumper": "^5.2|^6.0" + }, + "require-dev": { + "dms/phpunit-arraysubset-asserts": "^0.3.0", + "pestphp/pest": "^1.20", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "spatie/phpunit-snapshot-assertions": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Spatie\\FlareClient\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Send PHP errors to Flare", + "homepage": "https://github.com/spatie/flare-client-php", + "keywords": [ + "exception", + "flare", + "reporting", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/flare-client-php/issues", + "source": "https://github.com/spatie/flare-client-php/tree/1.2.0" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-05-16T12:13:39+00:00" + }, + { + "name": "spatie/ignition", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/spatie/ignition.git", + "reference": "997363fbcce809b1e55f571997d49017f9c623d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/ignition/zipball/997363fbcce809b1e55f571997d49017f9c623d9", + "reference": "997363fbcce809b1e55f571997d49017f9c623d9", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "monolog/monolog": "^2.0", + "php": "^8.0", + "spatie/flare-client-php": "^1.1", + "symfony/console": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" + }, + "require-dev": { + "mockery/mockery": "^1.4", + "pestphp/pest": "^1.20", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "symfony/process": "^5.4|^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Spatie\\Ignition\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Spatie", + "email": "info@spatie.be", + "role": "Developer" + } + ], + "description": "A beautiful error page for PHP applications.", + "homepage": "https://flareapp.io/ignition", + "keywords": [ + "error", + "flare", + "laravel", + "page" + ], + "support": { + "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", + "forum": "https://twitter.com/flareappio", + "issues": "https://github.com/spatie/ignition/issues", + "source": "https://github.com/spatie/ignition" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-05-16T13:16:07+00:00" + }, + { + "name": "spatie/laravel-ignition", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-ignition.git", + "reference": "5409e699fc19f4d53e59427445b08f90593fda28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/5409e699fc19f4d53e59427445b08f90593fda28", + "reference": "5409e699fc19f4d53e59427445b08f90593fda28", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "illuminate/support": "^8.77|^9.0", + "monolog/monolog": "^2.3", + "php": "^8.0", + "spatie/flare-client-php": "^1.0.1", + "spatie/ignition": "^1.2.4", + "symfony/console": "^5.0|^6.0", + "symfony/var-dumper": "^5.0|^6.0" + }, + "require-dev": { + "filp/whoops": "^2.14", + "livewire/livewire": "^2.8|dev-develop", + "mockery/mockery": "^1.4", + "nunomaduro/larastan": "^1.0", + "orchestra/testbench": "^6.23|^7.0", + "pestphp/pest": "^1.20", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "spatie/laravel-ray": "^1.27" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\LaravelIgnition\\IgnitionServiceProvider" + ], + "aliases": { + "Flare": "Spatie\\LaravelIgnition\\Facades\\Flare" + } + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Spatie\\LaravelIgnition\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Spatie", + "email": "info@spatie.be", + "role": "Developer" + } + ], + "description": "A beautiful error page for Laravel applications.", + "homepage": "https://flareapp.io/ignition", + "keywords": [ + "error", + "flare", + "laravel", + "page" + ], + "support": { + "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", + "forum": "https://twitter.com/flareappio", + "issues": "https://github.com/spatie/laravel-ignition/issues", + "source": "https://github.com/spatie/laravel-ignition" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-06-15T13:55:18+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" + } + ], + "aliases": [], + "minimum-stability": "dev", + "stability-flags": [], + "prefer-stable": true, + "prefer-lowest": false, + "platform": { + "php": "^8.0.2" + }, + "platform-dev": [], + "plugin-api-version": "2.1.0" +} diff --git a/examples/php-laravel-ext-mongodb/config/app.php b/examples/php-laravel-ext-mongodb/config/app.php new file mode 100644 index 000000000..ef76a7ed6 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/config/app.php @@ -0,0 +1,215 @@ + env('APP_NAME', 'Laravel'), + + /* + |-------------------------------------------------------------------------- + | Application Environment + |-------------------------------------------------------------------------- + | + | This value determines the "environment" your application is currently + | running in. This may determine how you prefer to configure various + | services the application utilizes. Set this in your ".env" file. + | + */ + + 'env' => env('APP_ENV', 'production'), + + /* + |-------------------------------------------------------------------------- + | Application Debug Mode + |-------------------------------------------------------------------------- + | + | When your application is in debug mode, detailed error messages with + | stack traces will be shown on every error that occurs within your + | application. If disabled, a simple generic error page is shown. + | + */ + + 'debug' => (bool) env('APP_DEBUG', false), + + /* + |-------------------------------------------------------------------------- + | Application URL + |-------------------------------------------------------------------------- + | + | This URL is used by the console to properly generate URLs when using + | the Artisan command line tool. You should set this to the root of + | your application so that it is used when running Artisan tasks. + | + */ + + 'url' => env('APP_URL', 'http://localhost'), + + 'asset_url' => env('ASSET_URL'), + + /* + |-------------------------------------------------------------------------- + | Application Timezone + |-------------------------------------------------------------------------- + | + | Here you may specify the default timezone for your application, which + | will be used by the PHP date and date-time functions. We have gone + | ahead and set this to a sensible default for you out of the box. + | + */ + + 'timezone' => 'UTC', + + /* + |-------------------------------------------------------------------------- + | Application Locale Configuration + |-------------------------------------------------------------------------- + | + | The application locale determines the default locale that will be used + | by the translation service provider. You are free to set this value + | to any of the locales which will be supported by the application. + | + */ + + 'locale' => 'en', + + /* + |-------------------------------------------------------------------------- + | Application Fallback Locale + |-------------------------------------------------------------------------- + | + | The fallback locale determines the locale to use when the current one + | is not available. You may change the value to correspond to any of + | the language folders that are provided through your application. + | + */ + + 'fallback_locale' => 'en', + + /* + |-------------------------------------------------------------------------- + | Faker Locale + |-------------------------------------------------------------------------- + | + | This locale will be used by the Faker PHP library when generating fake + | data for your database seeds. For example, this will be used to get + | localized telephone numbers, street address information and more. + | + */ + + 'faker_locale' => 'en_US', + + /* + |-------------------------------------------------------------------------- + | Encryption Key + |-------------------------------------------------------------------------- + | + | This key is used by the Illuminate encrypter service and should be set + | to a random, 32 character string, otherwise these encrypted strings + | will not be safe. Please do this before deploying an application! + | + */ + + 'key' => env('APP_KEY'), + + 'cipher' => 'AES-256-CBC', + + /* + |-------------------------------------------------------------------------- + | Maintenance Mode Driver + |-------------------------------------------------------------------------- + | + | These configuration options determine the driver used to determine and + | manage Laravel's "maintenance mode" status. The "cache" driver will + | allow maintenance mode to be controlled across multiple machines. + | + | Supported drivers: "file", "cache" + | + */ + + 'maintenance' => [ + 'driver' => 'file', + // 'store' => 'redis', + ], + + /* + |-------------------------------------------------------------------------- + | Autoloaded Service Providers + |-------------------------------------------------------------------------- + | + | The service providers listed here will be automatically loaded on the + | request to your application. Feel free to add your own services to + | this array to grant expanded functionality to your applications. + | + */ + + 'providers' => [ + + /* + * Laravel Framework Service Providers... + */ + Illuminate\Auth\AuthServiceProvider::class, + Illuminate\Broadcasting\BroadcastServiceProvider::class, + Illuminate\Bus\BusServiceProvider::class, + Illuminate\Cache\CacheServiceProvider::class, + Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, + Illuminate\Cookie\CookieServiceProvider::class, + Illuminate\Database\DatabaseServiceProvider::class, + Illuminate\Encryption\EncryptionServiceProvider::class, + Illuminate\Filesystem\FilesystemServiceProvider::class, + Illuminate\Foundation\Providers\FoundationServiceProvider::class, + Illuminate\Hashing\HashServiceProvider::class, + Illuminate\Mail\MailServiceProvider::class, + Illuminate\Notifications\NotificationServiceProvider::class, + Illuminate\Pagination\PaginationServiceProvider::class, + Illuminate\Pipeline\PipelineServiceProvider::class, + Illuminate\Queue\QueueServiceProvider::class, + Illuminate\Redis\RedisServiceProvider::class, + Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, + Illuminate\Session\SessionServiceProvider::class, + Illuminate\Translation\TranslationServiceProvider::class, + Illuminate\Validation\ValidationServiceProvider::class, + Illuminate\View\ViewServiceProvider::class, + + /* + * Package Service Providers... + */ + + /* + * Application Service Providers... + */ + App\Providers\AppServiceProvider::class, + App\Providers\AuthServiceProvider::class, + // App\Providers\BroadcastServiceProvider::class, + App\Providers\EventServiceProvider::class, + App\Providers\RouteServiceProvider::class, + + ], + + /* + |-------------------------------------------------------------------------- + | Class Aliases + |-------------------------------------------------------------------------- + | + | This array of class aliases will be registered when this application + | is started. However, feel free to register as many as you wish as + | the aliases are "lazy" loaded so they don't hinder performance. + | + */ + + 'aliases' => Facade::defaultAliases()->merge([ + // 'ExampleClass' => App\Example\ExampleClass::class, + ])->toArray(), + +]; diff --git a/examples/php-laravel-ext-mongodb/config/auth.php b/examples/php-laravel-ext-mongodb/config/auth.php new file mode 100644 index 000000000..d8c6cee7c --- /dev/null +++ b/examples/php-laravel-ext-mongodb/config/auth.php @@ -0,0 +1,111 @@ + [ + 'guard' => 'web', + 'passwords' => 'users', + ], + + /* + |-------------------------------------------------------------------------- + | Authentication Guards + |-------------------------------------------------------------------------- + | + | Next, you may define every authentication guard for your application. + | Of course, a great default configuration has been defined for you + | here which uses session storage and the Eloquent user provider. + | + | All authentication drivers have a user provider. This defines how the + | users are actually retrieved out of your database or other storage + | mechanisms used by this application to persist your user's data. + | + | Supported: "session" + | + */ + + 'guards' => [ + 'web' => [ + 'driver' => 'session', + 'provider' => 'users', + ], + ], + + /* + |-------------------------------------------------------------------------- + | User Providers + |-------------------------------------------------------------------------- + | + | All authentication drivers have a user provider. This defines how the + | users are actually retrieved out of your database or other storage + | mechanisms used by this application to persist your user's data. + | + | If you have multiple user tables or models you may configure multiple + | sources which represent each model / table. These sources may then + | be assigned to any extra authentication guards you have defined. + | + | Supported: "database", "eloquent" + | + */ + + 'providers' => [ + 'users' => [ + 'driver' => 'eloquent', + 'model' => App\Models\User::class, + ], + + // 'users' => [ + // 'driver' => 'database', + // 'table' => 'users', + // ], + ], + + /* + |-------------------------------------------------------------------------- + | Resetting Passwords + |-------------------------------------------------------------------------- + | + | You may specify multiple password reset configurations if you have more + | than one user table or model in the application and you want to have + | separate password reset settings based on the specific user types. + | + | The expire time is the number of minutes that each reset token will be + | considered valid. This security feature keeps tokens short-lived so + | they have less time to be guessed. You may change this as needed. + | + */ + + 'passwords' => [ + 'users' => [ + 'provider' => 'users', + 'table' => 'password_resets', + 'expire' => 60, + 'throttle' => 60, + ], + ], + + /* + |-------------------------------------------------------------------------- + | Password Confirmation Timeout + |-------------------------------------------------------------------------- + | + | Here you may define the amount of seconds before a password confirmation + | times out and the user is prompted to re-enter their password via the + | confirmation screen. By default, the timeout lasts for three hours. + | + */ + + 'password_timeout' => 10800, + +]; diff --git a/examples/php-laravel-ext-mongodb/config/broadcasting.php b/examples/php-laravel-ext-mongodb/config/broadcasting.php new file mode 100644 index 000000000..7cc990873 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/config/broadcasting.php @@ -0,0 +1,70 @@ + env('BROADCAST_DRIVER', 'null'), + + /* + |-------------------------------------------------------------------------- + | Broadcast Connections + |-------------------------------------------------------------------------- + | + | Here you may define all of the broadcast connections that will be used + | to broadcast events to other systems or over websockets. Samples of + | each available type of connection are provided inside this array. + | + */ + + 'connections' => [ + + 'pusher' => [ + 'driver' => 'pusher', + 'key' => env('PUSHER_APP_KEY'), + 'secret' => env('PUSHER_APP_SECRET'), + 'app_id' => env('PUSHER_APP_ID'), + 'options' => [ + 'host' => env('PUSHER_HOST', 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com'), + 'port' => env('PUSHER_PORT', 443), + 'scheme' => env('PUSHER_SCHEME', 'https'), + 'encrypted' => true, + 'useTLS' => env('PUSHER_SCHEME', 'https') === 'https', + ], + 'client_options' => [ + // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html + ], + ], + + 'ably' => [ + 'driver' => 'ably', + 'key' => env('ABLY_KEY'), + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => 'default', + ], + + 'log' => [ + 'driver' => 'log', + ], + + 'null' => [ + 'driver' => 'null', + ], + + ], + +]; diff --git a/examples/php-laravel-ext-mongodb/config/cache.php b/examples/php-laravel-ext-mongodb/config/cache.php new file mode 100644 index 000000000..33bb29546 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/config/cache.php @@ -0,0 +1,110 @@ + env('CACHE_DRIVER', 'file'), + + /* + |-------------------------------------------------------------------------- + | Cache Stores + |-------------------------------------------------------------------------- + | + | Here you may define all of the cache "stores" for your application as + | well as their drivers. You may even define multiple stores for the + | same cache driver to group types of items stored in your caches. + | + | Supported drivers: "apc", "array", "database", "file", + | "memcached", "redis", "dynamodb", "octane", "null" + | + */ + + 'stores' => [ + + 'apc' => [ + 'driver' => 'apc', + ], + + 'array' => [ + 'driver' => 'array', + 'serialize' => false, + ], + + 'database' => [ + 'driver' => 'database', + 'table' => 'cache', + 'connection' => null, + 'lock_connection' => null, + ], + + 'file' => [ + 'driver' => 'file', + 'path' => storage_path('framework/cache/data'), + ], + + 'memcached' => [ + 'driver' => 'memcached', + 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), + 'sasl' => [ + env('MEMCACHED_USERNAME'), + env('MEMCACHED_PASSWORD'), + ], + 'options' => [ + // Memcached::OPT_CONNECT_TIMEOUT => 2000, + ], + 'servers' => [ + [ + 'host' => env('MEMCACHED_HOST', '127.0.0.1'), + 'port' => env('MEMCACHED_PORT', 11211), + 'weight' => 100, + ], + ], + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => 'cache', + 'lock_connection' => 'default', + ], + + 'dynamodb' => [ + 'driver' => 'dynamodb', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), + 'endpoint' => env('DYNAMODB_ENDPOINT'), + ], + + 'octane' => [ + 'driver' => 'octane', + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Cache Key Prefix + |-------------------------------------------------------------------------- + | + | When utilizing the APC, database, memcached, Redis, or DynamoDB cache + | stores there might be other applications using the same cache. For + | that reason, you may prefix every cache key to avoid collisions. + | + */ + + 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), + +]; diff --git a/examples/php-laravel-ext-mongodb/config/cors.php b/examples/php-laravel-ext-mongodb/config/cors.php new file mode 100644 index 000000000..8a39e6daa --- /dev/null +++ b/examples/php-laravel-ext-mongodb/config/cors.php @@ -0,0 +1,34 @@ + ['api/*', 'sanctum/csrf-cookie'], + + 'allowed_methods' => ['*'], + + 'allowed_origins' => ['*'], + + 'allowed_origins_patterns' => [], + + 'allowed_headers' => ['*'], + + 'exposed_headers' => [], + + 'max_age' => 0, + + 'supports_credentials' => false, + +]; diff --git a/examples/php-laravel-ext-mongodb/config/database.php b/examples/php-laravel-ext-mongodb/config/database.php new file mode 100644 index 000000000..137ad18ce --- /dev/null +++ b/examples/php-laravel-ext-mongodb/config/database.php @@ -0,0 +1,151 @@ + env('DB_CONNECTION', 'mysql'), + + /* + |-------------------------------------------------------------------------- + | Database Connections + |-------------------------------------------------------------------------- + | + | Here are each of the database connections setup for your application. + | Of course, examples of configuring each database platform that is + | supported by Laravel is shown below to make development simple. + | + | + | All database work in Laravel is done through the PHP PDO facilities + | so make sure you have the driver for your particular database of + | choice installed on your machine before you begin development. + | + */ + + 'connections' => [ + + 'sqlite' => [ + 'driver' => 'sqlite', + 'url' => env('DATABASE_URL'), + 'database' => env('DB_DATABASE', database_path('database.sqlite')), + 'prefix' => '', + 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), + ], + + 'mysql' => [ + 'driver' => 'mysql', + 'url' => env('DATABASE_URL'), + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '3306'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'unix_socket' => env('DB_SOCKET', ''), + 'charset' => 'utf8mb4', + 'collation' => 'utf8mb4_unicode_ci', + 'prefix' => '', + 'prefix_indexes' => true, + 'strict' => true, + 'engine' => null, + 'options' => extension_loaded('pdo_mysql') ? array_filter([ + PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), + ]) : [], + ], + + 'pgsql' => [ + 'driver' => 'pgsql', + 'url' => env('DATABASE_URL'), + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '5432'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => 'utf8', + 'prefix' => '', + 'prefix_indexes' => true, + 'search_path' => 'public', + 'sslmode' => 'prefer', + ], + + 'sqlsrv' => [ + 'driver' => 'sqlsrv', + 'url' => env('DATABASE_URL'), + 'host' => env('DB_HOST', 'localhost'), + 'port' => env('DB_PORT', '1433'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => 'utf8', + 'prefix' => '', + 'prefix_indexes' => true, + // 'encrypt' => env('DB_ENCRYPT', 'yes'), + // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'), + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Migration Repository Table + |-------------------------------------------------------------------------- + | + | This table keeps track of all the migrations that have already run for + | your application. Using this information, we can determine which of + | the migrations on disk haven't actually been run in the database. + | + */ + + 'migrations' => 'migrations', + + /* + |-------------------------------------------------------------------------- + | Redis Databases + |-------------------------------------------------------------------------- + | + | Redis is an open source, fast, and advanced key-value store that also + | provides a richer body of commands than a typical key-value system + | such as APC or Memcached. Laravel makes it easy to dig right in. + | + */ + + 'redis' => [ + + 'client' => env('REDIS_CLIENT', 'phpredis'), + + 'options' => [ + 'cluster' => env('REDIS_CLUSTER', 'redis'), + 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), + ], + + 'default' => [ + 'url' => env('REDIS_URL'), + 'host' => env('REDIS_HOST', '127.0.0.1'), + 'username' => env('REDIS_USERNAME'), + 'password' => env('REDIS_PASSWORD'), + 'port' => env('REDIS_PORT', '6379'), + 'database' => env('REDIS_DB', '0'), + ], + + 'cache' => [ + 'url' => env('REDIS_URL'), + 'host' => env('REDIS_HOST', '127.0.0.1'), + 'username' => env('REDIS_USERNAME'), + 'password' => env('REDIS_PASSWORD'), + 'port' => env('REDIS_PORT', '6379'), + 'database' => env('REDIS_CACHE_DB', '1'), + ], + + ], + +]; diff --git a/examples/php-laravel-ext-mongodb/config/filesystems.php b/examples/php-laravel-ext-mongodb/config/filesystems.php new file mode 100644 index 000000000..e9d9dbdbe --- /dev/null +++ b/examples/php-laravel-ext-mongodb/config/filesystems.php @@ -0,0 +1,76 @@ + env('FILESYSTEM_DISK', 'local'), + + /* + |-------------------------------------------------------------------------- + | Filesystem Disks + |-------------------------------------------------------------------------- + | + | Here you may configure as many filesystem "disks" as you wish, and you + | may even configure multiple disks of the same driver. Defaults have + | been set up for each driver as an example of the required values. + | + | Supported Drivers: "local", "ftp", "sftp", "s3" + | + */ + + 'disks' => [ + + 'local' => [ + 'driver' => 'local', + 'root' => storage_path('app'), + 'throw' => false, + ], + + 'public' => [ + 'driver' => 'local', + 'root' => storage_path('app/public'), + 'url' => env('APP_URL').'/storage', + 'visibility' => 'public', + 'throw' => false, + ], + + 's3' => [ + 'driver' => 's3', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION'), + 'bucket' => env('AWS_BUCKET'), + 'url' => env('AWS_URL'), + 'endpoint' => env('AWS_ENDPOINT'), + 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), + 'throw' => false, + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Symbolic Links + |-------------------------------------------------------------------------- + | + | Here you may configure the symbolic links that will be created when the + | `storage:link` Artisan command is executed. The array keys should be + | the locations of the links and the values should be their targets. + | + */ + + 'links' => [ + public_path('storage') => storage_path('app/public'), + ], + +]; diff --git a/examples/php-laravel-ext-mongodb/config/hashing.php b/examples/php-laravel-ext-mongodb/config/hashing.php new file mode 100644 index 000000000..bcd3be4c2 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/config/hashing.php @@ -0,0 +1,52 @@ + 'bcrypt', + + /* + |-------------------------------------------------------------------------- + | Bcrypt Options + |-------------------------------------------------------------------------- + | + | Here you may specify the configuration options that should be used when + | passwords are hashed using the Bcrypt algorithm. This will allow you + | to control the amount of time it takes to hash the given password. + | + */ + + 'bcrypt' => [ + 'rounds' => env('BCRYPT_ROUNDS', 10), + ], + + /* + |-------------------------------------------------------------------------- + | Argon Options + |-------------------------------------------------------------------------- + | + | Here you may specify the configuration options that should be used when + | passwords are hashed using the Argon algorithm. These will allow you + | to control the amount of time it takes to hash the given password. + | + */ + + 'argon' => [ + 'memory' => 65536, + 'threads' => 1, + 'time' => 4, + ], + +]; diff --git a/examples/php-laravel-ext-mongodb/config/logging.php b/examples/php-laravel-ext-mongodb/config/logging.php new file mode 100644 index 000000000..5aa1dbb78 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/config/logging.php @@ -0,0 +1,122 @@ + env('LOG_CHANNEL', 'stack'), + + /* + |-------------------------------------------------------------------------- + | Deprecations Log Channel + |-------------------------------------------------------------------------- + | + | This option controls the log channel that should be used to log warnings + | regarding deprecated PHP and library features. This allows you to get + | your application ready for upcoming major versions of dependencies. + | + */ + + 'deprecations' => [ + 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), + 'trace' => false, + ], + + /* + |-------------------------------------------------------------------------- + | Log Channels + |-------------------------------------------------------------------------- + | + | Here you may configure the log channels for your application. Out of + | the box, Laravel uses the Monolog PHP logging library. This gives + | you a variety of powerful log handlers / formatters to utilize. + | + | Available Drivers: "single", "daily", "slack", "syslog", + | "errorlog", "monolog", + | "custom", "stack" + | + */ + + 'channels' => [ + 'stack' => [ + 'driver' => 'stack', + 'channels' => ['single'], + 'ignore_exceptions' => false, + ], + + 'single' => [ + 'driver' => 'single', + 'path' => storage_path('logs/laravel.log'), + 'level' => env('LOG_LEVEL', 'debug'), + ], + + 'daily' => [ + 'driver' => 'daily', + 'path' => storage_path('logs/laravel.log'), + 'level' => env('LOG_LEVEL', 'debug'), + 'days' => 14, + ], + + 'slack' => [ + 'driver' => 'slack', + 'url' => env('LOG_SLACK_WEBHOOK_URL'), + 'username' => 'Laravel Log', + 'emoji' => ':boom:', + 'level' => env('LOG_LEVEL', 'critical'), + ], + + 'papertrail' => [ + 'driver' => 'monolog', + 'level' => env('LOG_LEVEL', 'debug'), + 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), + 'handler_with' => [ + 'host' => env('PAPERTRAIL_URL'), + 'port' => env('PAPERTRAIL_PORT'), + 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), + ], + ], + + 'stderr' => [ + 'driver' => 'monolog', + 'level' => env('LOG_LEVEL', 'debug'), + 'handler' => StreamHandler::class, + 'formatter' => env('LOG_STDERR_FORMATTER'), + 'with' => [ + 'stream' => 'php://stderr', + ], + ], + + 'syslog' => [ + 'driver' => 'syslog', + 'level' => env('LOG_LEVEL', 'debug'), + ], + + 'errorlog' => [ + 'driver' => 'errorlog', + 'level' => env('LOG_LEVEL', 'debug'), + ], + + 'null' => [ + 'driver' => 'monolog', + 'handler' => NullHandler::class, + ], + + 'emergency' => [ + 'path' => storage_path('logs/laravel.log'), + ], + ], + +]; diff --git a/examples/php-laravel-ext-mongodb/config/mail.php b/examples/php-laravel-ext-mongodb/config/mail.php new file mode 100644 index 000000000..534395a36 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/config/mail.php @@ -0,0 +1,118 @@ + env('MAIL_MAILER', 'smtp'), + + /* + |-------------------------------------------------------------------------- + | Mailer Configurations + |-------------------------------------------------------------------------- + | + | Here you may configure all of the mailers used by your application plus + | their respective settings. Several examples have been configured for + | you and you are free to add your own as your application requires. + | + | Laravel supports a variety of mail "transport" drivers to be used while + | sending an e-mail. You will specify which one you are using for your + | mailers below. You are free to add additional mailers as required. + | + | Supported: "smtp", "sendmail", "mailgun", "ses", + | "postmark", "log", "array", "failover" + | + */ + + 'mailers' => [ + 'smtp' => [ + 'transport' => 'smtp', + 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), + 'port' => env('MAIL_PORT', 587), + 'encryption' => env('MAIL_ENCRYPTION', 'tls'), + 'username' => env('MAIL_USERNAME'), + 'password' => env('MAIL_PASSWORD'), + 'timeout' => null, + 'local_domain' => env('MAIL_EHLO_DOMAIN'), + ], + + 'ses' => [ + 'transport' => 'ses', + ], + + 'mailgun' => [ + 'transport' => 'mailgun', + ], + + 'postmark' => [ + 'transport' => 'postmark', + ], + + 'sendmail' => [ + 'transport' => 'sendmail', + 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), + ], + + 'log' => [ + 'transport' => 'log', + 'channel' => env('MAIL_LOG_CHANNEL'), + ], + + 'array' => [ + 'transport' => 'array', + ], + + 'failover' => [ + 'transport' => 'failover', + 'mailers' => [ + 'smtp', + 'log', + ], + ], + ], + + /* + |-------------------------------------------------------------------------- + | Global "From" Address + |-------------------------------------------------------------------------- + | + | You may wish for all e-mails sent by your application to be sent from + | the same address. Here, you may specify a name and address that is + | used globally for all e-mails that are sent by your application. + | + */ + + 'from' => [ + 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), + 'name' => env('MAIL_FROM_NAME', 'Example'), + ], + + /* + |-------------------------------------------------------------------------- + | Markdown Mail Settings + |-------------------------------------------------------------------------- + | + | If you are using Markdown based email rendering, you may configure your + | theme and component paths here, allowing you to customize the design + | of the emails. Or, you may simply stick with the Laravel defaults! + | + */ + + 'markdown' => [ + 'theme' => 'default', + + 'paths' => [ + resource_path('views/vendor/mail'), + ], + ], + +]; diff --git a/examples/php-laravel-ext-mongodb/config/queue.php b/examples/php-laravel-ext-mongodb/config/queue.php new file mode 100644 index 000000000..25ea5a819 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/config/queue.php @@ -0,0 +1,93 @@ + env('QUEUE_CONNECTION', 'sync'), + + /* + |-------------------------------------------------------------------------- + | Queue Connections + |-------------------------------------------------------------------------- + | + | Here you may configure the connection information for each server that + | is used by your application. A default configuration has been added + | for each back-end shipped with Laravel. You are free to add more. + | + | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" + | + */ + + 'connections' => [ + + 'sync' => [ + 'driver' => 'sync', + ], + + 'database' => [ + 'driver' => 'database', + 'table' => 'jobs', + 'queue' => 'default', + 'retry_after' => 90, + 'after_commit' => false, + ], + + 'beanstalkd' => [ + 'driver' => 'beanstalkd', + 'host' => 'localhost', + 'queue' => 'default', + 'retry_after' => 90, + 'block_for' => 0, + 'after_commit' => false, + ], + + 'sqs' => [ + 'driver' => 'sqs', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), + 'queue' => env('SQS_QUEUE', 'default'), + 'suffix' => env('SQS_SUFFIX'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + 'after_commit' => false, + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => 'default', + 'queue' => env('REDIS_QUEUE', 'default'), + 'retry_after' => 90, + 'block_for' => null, + 'after_commit' => false, + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Failed Queue Jobs + |-------------------------------------------------------------------------- + | + | These options configure the behavior of failed queue job logging so you + | can control which database and table are used to store the jobs that + | have failed. You may change them to any database / table you wish. + | + */ + + 'failed' => [ + 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), + 'database' => env('DB_CONNECTION', 'mysql'), + 'table' => 'failed_jobs', + ], + +]; diff --git a/examples/php-laravel-ext-mongodb/config/sanctum.php b/examples/php-laravel-ext-mongodb/config/sanctum.php new file mode 100644 index 000000000..529cfdc99 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/config/sanctum.php @@ -0,0 +1,67 @@ + explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( + '%s%s', + 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', + Sanctum::currentApplicationUrlWithPort() + ))), + + /* + |-------------------------------------------------------------------------- + | Sanctum Guards + |-------------------------------------------------------------------------- + | + | This array contains the authentication guards that will be checked when + | Sanctum is trying to authenticate a request. If none of these guards + | are able to authenticate the request, Sanctum will use the bearer + | token that's present on an incoming request for authentication. + | + */ + + 'guard' => ['web'], + + /* + |-------------------------------------------------------------------------- + | Expiration Minutes + |-------------------------------------------------------------------------- + | + | This value controls the number of minutes until an issued token will be + | considered expired. If this value is null, personal access tokens do + | not expire. This won't tweak the lifetime of first-party sessions. + | + */ + + 'expiration' => null, + + /* + |-------------------------------------------------------------------------- + | Sanctum Middleware + |-------------------------------------------------------------------------- + | + | When authenticating your first-party SPA with Sanctum you may need to + | customize some of the middleware Sanctum uses while processing the + | request. You may change the middleware listed below as required. + | + */ + + 'middleware' => [ + 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class, + 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class, + ], + +]; diff --git a/examples/php-laravel-ext-mongodb/config/services.php b/examples/php-laravel-ext-mongodb/config/services.php new file mode 100644 index 000000000..0ace530e8 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/config/services.php @@ -0,0 +1,34 @@ + [ + 'domain' => env('MAILGUN_DOMAIN'), + 'secret' => env('MAILGUN_SECRET'), + 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), + 'scheme' => 'https', + ], + + 'postmark' => [ + 'token' => env('POSTMARK_TOKEN'), + ], + + 'ses' => [ + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + ], + +]; diff --git a/examples/php-laravel-ext-mongodb/config/session.php b/examples/php-laravel-ext-mongodb/config/session.php new file mode 100644 index 000000000..8fed97c01 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/config/session.php @@ -0,0 +1,201 @@ + env('SESSION_DRIVER', 'file'), + + /* + |-------------------------------------------------------------------------- + | Session Lifetime + |-------------------------------------------------------------------------- + | + | Here you may specify the number of minutes that you wish the session + | to be allowed to remain idle before it expires. If you want them + | to immediately expire on the browser closing, set that option. + | + */ + + 'lifetime' => env('SESSION_LIFETIME', 120), + + 'expire_on_close' => false, + + /* + |-------------------------------------------------------------------------- + | Session Encryption + |-------------------------------------------------------------------------- + | + | This option allows you to easily specify that all of your session data + | should be encrypted before it is stored. All encryption will be run + | automatically by Laravel and you can use the Session like normal. + | + */ + + 'encrypt' => false, + + /* + |-------------------------------------------------------------------------- + | Session File Location + |-------------------------------------------------------------------------- + | + | When using the native session driver, we need a location where session + | files may be stored. A default has been set for you but a different + | location may be specified. This is only needed for file sessions. + | + */ + + 'files' => storage_path('framework/sessions'), + + /* + |-------------------------------------------------------------------------- + | Session Database Connection + |-------------------------------------------------------------------------- + | + | When using the "database" or "redis" session drivers, you may specify a + | connection that should be used to manage these sessions. This should + | correspond to a connection in your database configuration options. + | + */ + + 'connection' => env('SESSION_CONNECTION'), + + /* + |-------------------------------------------------------------------------- + | Session Database Table + |-------------------------------------------------------------------------- + | + | When using the "database" session driver, you may specify the table we + | should use to manage the sessions. Of course, a sensible default is + | provided for you; however, you are free to change this as needed. + | + */ + + 'table' => 'sessions', + + /* + |-------------------------------------------------------------------------- + | Session Cache Store + |-------------------------------------------------------------------------- + | + | While using one of the framework's cache driven session backends you may + | list a cache store that should be used for these sessions. This value + | must match with one of the application's configured cache "stores". + | + | Affects: "apc", "dynamodb", "memcached", "redis" + | + */ + + 'store' => env('SESSION_STORE'), + + /* + |-------------------------------------------------------------------------- + | Session Sweeping Lottery + |-------------------------------------------------------------------------- + | + | Some session drivers must manually sweep their storage location to get + | rid of old sessions from storage. Here are the chances that it will + | happen on a given request. By default, the odds are 2 out of 100. + | + */ + + 'lottery' => [2, 100], + + /* + |-------------------------------------------------------------------------- + | Session Cookie Name + |-------------------------------------------------------------------------- + | + | Here you may change the name of the cookie used to identify a session + | instance by ID. The name specified here will get used every time a + | new session cookie is created by the framework for every driver. + | + */ + + 'cookie' => env( + 'SESSION_COOKIE', + Str::slug(env('APP_NAME', 'laravel'), '_').'_session' + ), + + /* + |-------------------------------------------------------------------------- + | Session Cookie Path + |-------------------------------------------------------------------------- + | + | The session cookie path determines the path for which the cookie will + | be regarded as available. Typically, this will be the root path of + | your application but you are free to change this when necessary. + | + */ + + 'path' => '/', + + /* + |-------------------------------------------------------------------------- + | Session Cookie Domain + |-------------------------------------------------------------------------- + | + | Here you may change the domain of the cookie used to identify a session + | in your application. This will determine which domains the cookie is + | available to in your application. A sensible default has been set. + | + */ + + 'domain' => env('SESSION_DOMAIN'), + + /* + |-------------------------------------------------------------------------- + | HTTPS Only Cookies + |-------------------------------------------------------------------------- + | + | By setting this option to true, session cookies will only be sent back + | to the server if the browser has a HTTPS connection. This will keep + | the cookie from being sent to you when it can't be done securely. + | + */ + + 'secure' => env('SESSION_SECURE_COOKIE'), + + /* + |-------------------------------------------------------------------------- + | HTTP Access Only + |-------------------------------------------------------------------------- + | + | Setting this value to true will prevent JavaScript from accessing the + | value of the cookie and the cookie will only be accessible through + | the HTTP protocol. You are free to modify this option if needed. + | + */ + + 'http_only' => true, + + /* + |-------------------------------------------------------------------------- + | Same-Site Cookies + |-------------------------------------------------------------------------- + | + | This option determines how your cookies behave when cross-site requests + | take place, and can be used to mitigate CSRF attacks. By default, we + | will set this value to "lax" since this is a secure default value. + | + | Supported: "lax", "strict", "none", null + | + */ + + 'same_site' => 'lax', + +]; diff --git a/examples/php-laravel-ext-mongodb/config/view.php b/examples/php-laravel-ext-mongodb/config/view.php new file mode 100644 index 000000000..22b8a18d3 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/config/view.php @@ -0,0 +1,36 @@ + [ + resource_path('views'), + ], + + /* + |-------------------------------------------------------------------------- + | Compiled View Path + |-------------------------------------------------------------------------- + | + | This option determines where all the compiled Blade templates will be + | stored for your application. Typically, this is within the storage + | directory. However, as usual, you are free to change this value. + | + */ + + 'compiled' => env( + 'VIEW_COMPILED_PATH', + realpath(storage_path('framework/views')) + ), + +]; diff --git a/examples/php-laravel-ext-mongodb/database/.gitignore b/examples/php-laravel-ext-mongodb/database/.gitignore new file mode 100644 index 000000000..9b19b93c9 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/database/.gitignore @@ -0,0 +1 @@ +*.sqlite* diff --git a/examples/php-laravel-ext-mongodb/database/factories/UserFactory.php b/examples/php-laravel-ext-mongodb/database/factories/UserFactory.php new file mode 100644 index 000000000..23b61d242 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/database/factories/UserFactory.php @@ -0,0 +1,42 @@ + + */ +class UserFactory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition() + { + return [ + 'name' => $this->faker->name(), + 'email' => $this->faker->unique()->safeEmail(), + 'email_verified_at' => now(), + 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password + 'remember_token' => Str::random(10), + ]; + } + + /** + * Indicate that the model's email address should be unverified. + * + * @return static + */ + public function unverified() + { + return $this->state(function (array $attributes) { + return [ + 'email_verified_at' => null, + ]; + }); + } +} diff --git a/examples/php-laravel-ext-mongodb/database/migrations/2014_10_12_000000_create_users_table.php b/examples/php-laravel-ext-mongodb/database/migrations/2014_10_12_000000_create_users_table.php new file mode 100644 index 000000000..cf6b77661 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/database/migrations/2014_10_12_000000_create_users_table.php @@ -0,0 +1,36 @@ +id(); + $table->string('name'); + $table->string('email')->unique(); + $table->timestamp('email_verified_at')->nullable(); + $table->string('password'); + $table->rememberToken(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('users'); + } +}; diff --git a/examples/php-laravel-ext-mongodb/database/migrations/2014_10_12_100000_create_password_resets_table.php b/examples/php-laravel-ext-mongodb/database/migrations/2014_10_12_100000_create_password_resets_table.php new file mode 100644 index 000000000..fcacb80b3 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/database/migrations/2014_10_12_100000_create_password_resets_table.php @@ -0,0 +1,32 @@ +string('email')->index(); + $table->string('token'); + $table->timestamp('created_at')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('password_resets'); + } +}; diff --git a/examples/php-laravel-ext-mongodb/database/migrations/2019_08_19_000000_create_failed_jobs_table.php b/examples/php-laravel-ext-mongodb/database/migrations/2019_08_19_000000_create_failed_jobs_table.php new file mode 100644 index 000000000..17191986b --- /dev/null +++ b/examples/php-laravel-ext-mongodb/database/migrations/2019_08_19_000000_create_failed_jobs_table.php @@ -0,0 +1,36 @@ +id(); + $table->string('uuid')->unique(); + $table->text('connection'); + $table->text('queue'); + $table->longText('payload'); + $table->longText('exception'); + $table->timestamp('failed_at')->useCurrent(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('failed_jobs'); + } +}; diff --git a/examples/php-laravel-ext-mongodb/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/examples/php-laravel-ext-mongodb/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php new file mode 100644 index 000000000..fd235f8c5 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php @@ -0,0 +1,36 @@ +id(); + $table->morphs('tokenable'); + $table->string('name'); + $table->string('token', 64)->unique(); + $table->text('abilities')->nullable(); + $table->timestamp('last_used_at')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('personal_access_tokens'); + } +}; diff --git a/examples/php-laravel-ext-mongodb/database/seeders/DatabaseSeeder.php b/examples/php-laravel-ext-mongodb/database/seeders/DatabaseSeeder.php new file mode 100644 index 000000000..c1c48a060 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/database/seeders/DatabaseSeeder.php @@ -0,0 +1,24 @@ +create(); + + // \App\Models\User::factory()->create([ + // 'name' => 'Test User', + // 'email' => 'test@example.com', + // ]); + } +} diff --git a/examples/php-laravel-ext-mongodb/docker-compose.yml b/examples/php-laravel-ext-mongodb/docker-compose.yml new file mode 100644 index 000000000..ff6714132 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/docker-compose.yml @@ -0,0 +1,96 @@ +# For more information: https://laravel.com/docs/sail +version: '3' +services: + laravel.test: + build: + context: ./vendor/laravel/sail/runtimes/8.1 + dockerfile: Dockerfile + args: + WWWGROUP: '${WWWGROUP}' + image: sail-8.1/app + extra_hosts: + - 'host.docker.internal:host-gateway' + ports: + - '${APP_PORT:-80}:80' + - '${HMR_PORT:-8080}:8080' + environment: + WWWUSER: '${WWWUSER}' + LARAVEL_SAIL: 1 + XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}' + XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}' + volumes: + - '.:/var/www/html' + networks: + - sail + depends_on: + - mysql + - redis + - meilisearch + - selenium + mysql: + image: 'mysql/mysql-server:8.0' + ports: + - '${FORWARD_DB_PORT:-3306}:3306' + environment: + MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}' + MYSQL_ROOT_HOST: "%" + MYSQL_DATABASE: '${DB_DATABASE}' + MYSQL_USER: '${DB_USERNAME}' + MYSQL_PASSWORD: '${DB_PASSWORD}' + MYSQL_ALLOW_EMPTY_PASSWORD: 1 + volumes: + - 'sail-mysql:/var/lib/mysql' + - './vendor/laravel/sail/database/mysql/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh' + networks: + - sail + healthcheck: + test: ["CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}"] + retries: 3 + timeout: 5s + redis: + image: 'redis:alpine' + ports: + - '${FORWARD_REDIS_PORT:-6379}:6379' + volumes: + - 'sail-redis:/data' + networks: + - sail + healthcheck: + test: ["CMD", "redis-cli", "ping"] + retries: 3 + timeout: 5s + meilisearch: + image: 'getmeili/meilisearch:latest' + ports: + - '${FORWARD_MEILISEARCH_PORT:-7700}:7700' + volumes: + - 'sail-meilisearch:/meili_data' + networks: + - sail + healthcheck: + test: ["CMD", "wget", "--no-verbose", "--spider", "http://localhost:7700/health"] + retries: 3 + timeout: 5s + mailhog: + image: 'mailhog/mailhog:latest' + ports: + - '${FORWARD_MAILHOG_PORT:-1025}:1025' + - '${FORWARD_MAILHOG_DASHBOARD_PORT:-8025}:8025' + networks: + - sail + selenium: + image: 'selenium/standalone-chrome' + volumes: + - '/dev/shm:/dev/shm' + networks: + - sail +networks: + sail: + driver: bridge +volumes: + sail-mysql: + driver: local + sail-redis: + driver: local + sail-meilisearch: + driver: local diff --git a/examples/php-laravel-ext-mongodb/lang/en/auth.php b/examples/php-laravel-ext-mongodb/lang/en/auth.php new file mode 100644 index 000000000..6598e2c06 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/lang/en/auth.php @@ -0,0 +1,20 @@ + 'These credentials do not match our records.', + 'password' => 'The provided password is incorrect.', + 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', + +]; diff --git a/examples/php-laravel-ext-mongodb/lang/en/pagination.php b/examples/php-laravel-ext-mongodb/lang/en/pagination.php new file mode 100644 index 000000000..d48141187 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/lang/en/pagination.php @@ -0,0 +1,19 @@ + '« Previous', + 'next' => 'Next »', + +]; diff --git a/examples/php-laravel-ext-mongodb/lang/en/passwords.php b/examples/php-laravel-ext-mongodb/lang/en/passwords.php new file mode 100644 index 000000000..2345a56b5 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/lang/en/passwords.php @@ -0,0 +1,22 @@ + 'Your password has been reset!', + 'sent' => 'We have emailed your password reset link!', + 'throttled' => 'Please wait before retrying.', + 'token' => 'This password reset token is invalid.', + 'user' => "We can't find a user with that email address.", + +]; diff --git a/examples/php-laravel-ext-mongodb/lang/en/validation.php b/examples/php-laravel-ext-mongodb/lang/en/validation.php new file mode 100644 index 000000000..77fb5118d --- /dev/null +++ b/examples/php-laravel-ext-mongodb/lang/en/validation.php @@ -0,0 +1,170 @@ + 'The :attribute must be accepted.', + 'accepted_if' => 'The :attribute must be accepted when :other is :value.', + 'active_url' => 'The :attribute is not a valid URL.', + 'after' => 'The :attribute must be a date after :date.', + 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', + 'alpha' => 'The :attribute must only contain letters.', + 'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.', + 'alpha_num' => 'The :attribute must only contain letters and numbers.', + 'array' => 'The :attribute must be an array.', + 'before' => 'The :attribute must be a date before :date.', + 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', + 'between' => [ + 'array' => 'The :attribute must have between :min and :max items.', + 'file' => 'The :attribute must be between :min and :max kilobytes.', + 'numeric' => 'The :attribute must be between :min and :max.', + 'string' => 'The :attribute must be between :min and :max characters.', + ], + 'boolean' => 'The :attribute field must be true or false.', + 'confirmed' => 'The :attribute confirmation does not match.', + 'current_password' => 'The password is incorrect.', + 'date' => 'The :attribute is not a valid date.', + 'date_equals' => 'The :attribute must be a date equal to :date.', + 'date_format' => 'The :attribute does not match the format :format.', + 'declined' => 'The :attribute must be declined.', + 'declined_if' => 'The :attribute must be declined when :other is :value.', + 'different' => 'The :attribute and :other must be different.', + 'digits' => 'The :attribute must be :digits digits.', + 'digits_between' => 'The :attribute must be between :min and :max digits.', + 'dimensions' => 'The :attribute has invalid image dimensions.', + 'distinct' => 'The :attribute field has a duplicate value.', + 'email' => 'The :attribute must be a valid email address.', + 'ends_with' => 'The :attribute must end with one of the following: :values.', + 'enum' => 'The selected :attribute is invalid.', + 'exists' => 'The selected :attribute is invalid.', + 'file' => 'The :attribute must be a file.', + 'filled' => 'The :attribute field must have a value.', + 'gt' => [ + 'array' => 'The :attribute must have more than :value items.', + 'file' => 'The :attribute must be greater than :value kilobytes.', + 'numeric' => 'The :attribute must be greater than :value.', + 'string' => 'The :attribute must be greater than :value characters.', + ], + 'gte' => [ + 'array' => 'The :attribute must have :value items or more.', + 'file' => 'The :attribute must be greater than or equal to :value kilobytes.', + 'numeric' => 'The :attribute must be greater than or equal to :value.', + 'string' => 'The :attribute must be greater than or equal to :value characters.', + ], + 'image' => 'The :attribute must be an image.', + 'in' => 'The selected :attribute is invalid.', + 'in_array' => 'The :attribute field does not exist in :other.', + 'integer' => 'The :attribute must be an integer.', + 'ip' => 'The :attribute must be a valid IP address.', + 'ipv4' => 'The :attribute must be a valid IPv4 address.', + 'ipv6' => 'The :attribute must be a valid IPv6 address.', + 'json' => 'The :attribute must be a valid JSON string.', + 'lt' => [ + 'array' => 'The :attribute must have less than :value items.', + 'file' => 'The :attribute must be less than :value kilobytes.', + 'numeric' => 'The :attribute must be less than :value.', + 'string' => 'The :attribute must be less than :value characters.', + ], + 'lte' => [ + 'array' => 'The :attribute must not have more than :value items.', + 'file' => 'The :attribute must be less than or equal to :value kilobytes.', + 'numeric' => 'The :attribute must be less than or equal to :value.', + 'string' => 'The :attribute must be less than or equal to :value characters.', + ], + 'mac_address' => 'The :attribute must be a valid MAC address.', + 'max' => [ + 'array' => 'The :attribute must not have more than :max items.', + 'file' => 'The :attribute must not be greater than :max kilobytes.', + 'numeric' => 'The :attribute must not be greater than :max.', + 'string' => 'The :attribute must not be greater than :max characters.', + ], + 'mimes' => 'The :attribute must be a file of type: :values.', + 'mimetypes' => 'The :attribute must be a file of type: :values.', + 'min' => [ + 'array' => 'The :attribute must have at least :min items.', + 'file' => 'The :attribute must be at least :min kilobytes.', + 'numeric' => 'The :attribute must be at least :min.', + 'string' => 'The :attribute must be at least :min characters.', + ], + 'multiple_of' => 'The :attribute must be a multiple of :value.', + 'not_in' => 'The selected :attribute is invalid.', + 'not_regex' => 'The :attribute format is invalid.', + 'numeric' => 'The :attribute must be a number.', + 'password' => [ + 'letters' => 'The :attribute must contain at least one letter.', + 'mixed' => 'The :attribute must contain at least one uppercase and one lowercase letter.', + 'numbers' => 'The :attribute must contain at least one number.', + 'symbols' => 'The :attribute must contain at least one symbol.', + 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.', + ], + 'present' => 'The :attribute field must be present.', + 'prohibited' => 'The :attribute field is prohibited.', + 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', + 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', + 'prohibits' => 'The :attribute field prohibits :other from being present.', + 'regex' => 'The :attribute format is invalid.', + 'required' => 'The :attribute field is required.', + 'required_array_keys' => 'The :attribute field must contain entries for: :values.', + 'required_if' => 'The :attribute field is required when :other is :value.', + 'required_unless' => 'The :attribute field is required unless :other is in :values.', + 'required_with' => 'The :attribute field is required when :values is present.', + 'required_with_all' => 'The :attribute field is required when :values are present.', + 'required_without' => 'The :attribute field is required when :values is not present.', + 'required_without_all' => 'The :attribute field is required when none of :values are present.', + 'same' => 'The :attribute and :other must match.', + 'size' => [ + 'array' => 'The :attribute must contain :size items.', + 'file' => 'The :attribute must be :size kilobytes.', + 'numeric' => 'The :attribute must be :size.', + 'string' => 'The :attribute must be :size characters.', + ], + 'starts_with' => 'The :attribute must start with one of the following: :values.', + 'doesnt_start_with' => 'The :attribute may not start with one of the following: :values.', + 'string' => 'The :attribute must be a string.', + 'timezone' => 'The :attribute must be a valid timezone.', + 'unique' => 'The :attribute has already been taken.', + 'uploaded' => 'The :attribute failed to upload.', + 'url' => 'The :attribute must be a valid URL.', + 'uuid' => 'The :attribute must be a valid UUID.', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap our attribute placeholder + | with something more reader friendly such as "E-Mail Address" instead + | of "email". This simply helps us make our message more expressive. + | + */ + + 'attributes' => [], + +]; diff --git a/examples/php-laravel-ext-mongodb/package.json b/examples/php-laravel-ext-mongodb/package.json new file mode 100644 index 000000000..7a9aecdf3 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/package.json @@ -0,0 +1,18 @@ +{ + "private": true, + "scripts": { + "dev": "npm run development", + "development": "mix", + "watch": "mix watch", + "watch-poll": "mix watch -- --watch-options-poll=1000", + "hot": "mix watch --hot", + "prod": "npm run production", + "production": "mix --production" + }, + "devDependencies": { + "axios": "^0.25", + "laravel-mix": "^6.0.6", + "lodash": "^4.17.19", + "postcss": "^8.1.14" + } +} diff --git a/examples/php-laravel-ext-mongodb/phpunit.xml b/examples/php-laravel-ext-mongodb/phpunit.xml new file mode 100644 index 000000000..49661e5d2 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/phpunit.xml @@ -0,0 +1,30 @@ + + + + + ./tests/Unit + + + ./tests/Feature + + + + + ./app + + + + + + + + + + + + + diff --git a/examples/php-laravel-ext-mongodb/public/.htaccess b/examples/php-laravel-ext-mongodb/public/.htaccess new file mode 100644 index 000000000..3aec5e27e --- /dev/null +++ b/examples/php-laravel-ext-mongodb/public/.htaccess @@ -0,0 +1,21 @@ + + + Options -MultiViews -Indexes + + + RewriteEngine On + + # Handle Authorization Header + RewriteCond %{HTTP:Authorization} . + RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + + # Redirect Trailing Slashes If Not A Folder... + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_URI} (.+)/$ + RewriteRule ^ %1 [L,R=301] + + # Send Requests To Front Controller... + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ index.php [L] + diff --git a/examples/php-laravel-ext-mongodb/public/favicon.ico b/examples/php-laravel-ext-mongodb/public/favicon.ico new file mode 100644 index 000000000..e69de29bb diff --git a/examples/php-laravel-ext-mongodb/public/index.php b/examples/php-laravel-ext-mongodb/public/index.php new file mode 100644 index 000000000..1d69f3a28 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/public/index.php @@ -0,0 +1,55 @@ +make(Kernel::class); + +$response = $kernel->handle( + $request = Request::capture() +)->send(); + +$kernel->terminate($request, $response); diff --git a/examples/php-laravel-ext-mongodb/public/robots.txt b/examples/php-laravel-ext-mongodb/public/robots.txt new file mode 100644 index 000000000..eb0536286 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: diff --git a/examples/php-laravel-ext-mongodb/resources/css/app.css b/examples/php-laravel-ext-mongodb/resources/css/app.css new file mode 100644 index 000000000..e69de29bb diff --git a/examples/php-laravel-ext-mongodb/resources/js/app.js b/examples/php-laravel-ext-mongodb/resources/js/app.js new file mode 100644 index 000000000..e59d6a0ad --- /dev/null +++ b/examples/php-laravel-ext-mongodb/resources/js/app.js @@ -0,0 +1 @@ +import './bootstrap'; diff --git a/examples/php-laravel-ext-mongodb/resources/js/bootstrap.js b/examples/php-laravel-ext-mongodb/resources/js/bootstrap.js new file mode 100644 index 000000000..bbcdba42b --- /dev/null +++ b/examples/php-laravel-ext-mongodb/resources/js/bootstrap.js @@ -0,0 +1,31 @@ +import _ from 'lodash'; +window._ = _; + +/** + * We'll load the axios HTTP library which allows us to easily issue requests + * to our Laravel back-end. This library automatically handles sending the + * CSRF token as a header based on the value of the "XSRF" token cookie. + */ + +import axios from 'axios'; +window.axios = axios; + +window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; + +/** + * Echo exposes an expressive API for subscribing to channels and listening + * for events that are broadcast by Laravel. Echo and event broadcasting + * allows your team to easily build robust real-time web applications. + */ + +// import Echo from 'laravel-echo'; + +// import Pusher from 'pusher-js'; +// window.Pusher = Pusher; + +// window.Echo = new Echo({ +// broadcaster: 'pusher', +// key: process.env.MIX_PUSHER_APP_KEY, +// cluster: process.env.MIX_PUSHER_APP_CLUSTER, +// forceTLS: true +// }); diff --git a/examples/php-laravel-ext-mongodb/resources/views/welcome.blade.php b/examples/php-laravel-ext-mongodb/resources/views/welcome.blade.php new file mode 100644 index 000000000..dd6a45db7 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/resources/views/welcome.blade.php @@ -0,0 +1,132 @@ + + + + + + + Laravel + + + + + + + + + + +
+ @if (Route::has('login')) + + @endif + +
+
+ + + + + +
+ +
+
+
+ + +
+
+ Laravel has wonderful, thorough documentation covering every aspect of the framework. Whether you are new to the framework or have previous experience with Laravel, we recommend reading all of the documentation from beginning to end. +
+
+
+ +
+
+ + +
+ +
+
+ Laracasts offers thousands of video tutorials on Laravel, PHP, and JavaScript development. Check them out, see for yourself, and massively level up your development skills in the process. +
+
+
+ +
+
+ + +
+ +
+
+ Laravel News is a community driven portal and newsletter aggregating all of the latest and most important news in the Laravel ecosystem, including new package releases and tutorials. +
+
+
+ +
+
+ +
Vibrant Ecosystem
+
+ +
+
+ Laravel's robust library of first-party tools and libraries, such as Forge, Vapor, Nova, and Envoyer help you take your projects to the next level. Pair them with powerful open source libraries like Cashier, Dusk, Echo, Horizon, Sanctum, Telescope, and more. +
+
+
+
+
+ +
+
+
+ + + + + + Shop + + + + + + + + Sponsor + +
+
+ +
+ Laravel v{{ Illuminate\Foundation\Application::VERSION }} (PHP v{{ PHP_VERSION }}) +
+
+
+
+ + diff --git a/examples/php-laravel-ext-mongodb/routes/api.php b/examples/php-laravel-ext-mongodb/routes/api.php new file mode 100644 index 000000000..eb6fa48c2 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/routes/api.php @@ -0,0 +1,19 @@ +get('/user', function (Request $request) { + return $request->user(); +}); diff --git a/examples/php-laravel-ext-mongodb/routes/channels.php b/examples/php-laravel-ext-mongodb/routes/channels.php new file mode 100644 index 000000000..5d451e1fa --- /dev/null +++ b/examples/php-laravel-ext-mongodb/routes/channels.php @@ -0,0 +1,18 @@ +id === (int) $id; +}); diff --git a/examples/php-laravel-ext-mongodb/routes/console.php b/examples/php-laravel-ext-mongodb/routes/console.php new file mode 100644 index 000000000..e05f4c9a1 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/routes/console.php @@ -0,0 +1,19 @@ +comment(Inspiring::quote()); +})->purpose('Display an inspiring quote'); diff --git a/examples/php-laravel-ext-mongodb/routes/web.php b/examples/php-laravel-ext-mongodb/routes/web.php new file mode 100644 index 000000000..b13039731 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/routes/web.php @@ -0,0 +1,18 @@ +make(Kernel::class)->bootstrap(); + + return $app; + } +} diff --git a/examples/php-laravel-ext-mongodb/tests/Feature/ExampleTest.php b/examples/php-laravel-ext-mongodb/tests/Feature/ExampleTest.php new file mode 100644 index 000000000..78ccc21f4 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/tests/Feature/ExampleTest.php @@ -0,0 +1,21 @@ +get('/'); + + $response->assertStatus(200); + } +} diff --git a/examples/php-laravel-ext-mongodb/tests/TestCase.php b/examples/php-laravel-ext-mongodb/tests/TestCase.php new file mode 100644 index 000000000..2932d4a69 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/tests/TestCase.php @@ -0,0 +1,10 @@ +assertTrue(true); + } +} diff --git a/examples/php-laravel-ext-mongodb/webpack.mix.js b/examples/php-laravel-ext-mongodb/webpack.mix.js new file mode 100644 index 000000000..2a22dc120 --- /dev/null +++ b/examples/php-laravel-ext-mongodb/webpack.mix.js @@ -0,0 +1,17 @@ +const mix = require('laravel-mix'); + +/* + |-------------------------------------------------------------------------- + | Mix Asset Management + |-------------------------------------------------------------------------- + | + | Mix provides a clean, fluent API for defining some Webpack build steps + | for your Laravel applications. By default, we are compiling the CSS + | file for the application as well as bundling up all the JS files. + | + */ + +mix.js('resources/js/app.js', 'public/js') + .postCss('resources/css/app.css', 'public/css', [ + // + ]); diff --git a/examples/php-laravel/.env b/examples/php-laravel/.env new file mode 100644 index 000000000..b3c3fb90d --- /dev/null +++ b/examples/php-laravel/.env @@ -0,0 +1,52 @@ +APP_NAME=Laravel +APP_ENV=local +APP_KEY=base64:VWcxA9RjbkRMR61jtuWJJ5P7NmTNdDT7gDyjI8OD9J8= +APP_DEBUG=true +APP_URL=http://localhost + +LOG_CHANNEL=stack +LOG_DEPRECATIONS_CHANNEL=null +LOG_LEVEL=debug + +DB_CONNECTION=mysql +DB_HOST=127.0.0.1 +DB_PORT=3306 +DB_DATABASE=php_laravel +DB_USERNAME=root +DB_PASSWORD= + +BROADCAST_DRIVER=log +CACHE_DRIVER=file +FILESYSTEM_DISK=local +QUEUE_CONNECTION=sync +SESSION_DRIVER=file +SESSION_LIFETIME=120 + +MEMCACHED_HOST=127.0.0.1 + +REDIS_HOST=127.0.0.1 +REDIS_PASSWORD=null +REDIS_PORT=6379 + +MAIL_MAILER=smtp +MAIL_HOST=mailhog +MAIL_PORT=1025 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_ENCRYPTION=null +MAIL_FROM_ADDRESS="hello@example.com" +MAIL_FROM_NAME="${APP_NAME}" + +AWS_ACCESS_KEY_ID= +AWS_SECRET_ACCESS_KEY= +AWS_DEFAULT_REGION=us-east-1 +AWS_BUCKET= +AWS_USE_PATH_STYLE_ENDPOINT=false + +PUSHER_APP_ID= +PUSHER_APP_KEY= +PUSHER_APP_SECRET= +PUSHER_APP_CLUSTER=mt1 + +MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" +MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" diff --git a/examples/php-laravel/.gitignore b/examples/php-laravel/.gitignore index bc67a663b..f7534cf00 100644 --- a/examples/php-laravel/.gitignore +++ b/examples/php-laravel/.gitignore @@ -3,7 +3,6 @@ /public/storage /storage/*.key /vendor -.env .env.backup .phpunit.result.cache Homestead.json diff --git a/examples/php-vanilla/index.php b/examples/php-vanilla/index.php index 0b537d11c..cbc764682 100644 --- a/examples/php-vanilla/index.php +++ b/examples/php-vanilla/index.php @@ -3,7 +3,7 @@ Hello World! + + + + <%= yield %> + + diff --git a/examples/ruby-rails-api-app/app/views/layouts/mailer.text.erb b/examples/ruby-rails-api-app/app/views/layouts/mailer.text.erb new file mode 100644 index 000000000..37f0bddbd --- /dev/null +++ b/examples/ruby-rails-api-app/app/views/layouts/mailer.text.erb @@ -0,0 +1 @@ +<%= yield %> diff --git a/examples/ruby-rails-api-app/bin/bundle b/examples/ruby-rails-api-app/bin/bundle new file mode 100755 index 000000000..ee73929e5 --- /dev/null +++ b/examples/ruby-rails-api-app/bin/bundle @@ -0,0 +1,109 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'bundle' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "rubygems" + +m = Module.new do + module_function + + def invoked_as_script? + File.expand_path($0) == File.expand_path(__FILE__) + end + + def env_var_version + ENV["BUNDLER_VERSION"] + end + + def cli_arg_version + return unless invoked_as_script? # don't want to hijack other binstubs + return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update` + bundler_version = nil + update_index = nil + ARGV.each_with_index do |a, i| + if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN + bundler_version = a + end + next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/ + bundler_version = $1 + update_index = i + end + bundler_version + end + + def gemfile + gemfile = ENV["BUNDLE_GEMFILE"] + return gemfile if gemfile && !gemfile.empty? + + File.expand_path("../Gemfile", __dir__) + end + + def lockfile + lockfile = + case File.basename(gemfile) + when "gems.rb" then gemfile.sub(/\.rb$/, gemfile) + else "#{gemfile}.lock" + end + File.expand_path(lockfile) + end + + def lockfile_version + return unless File.file?(lockfile) + lockfile_contents = File.read(lockfile) + return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/ + Regexp.last_match(1) + end + + def bundler_requirement + @bundler_requirement ||= + env_var_version || + cli_arg_version || + bundler_requirement_for(lockfile_version) + end + + def bundler_requirement_for(version) + return "#{Gem::Requirement.default}.a" unless version + + bundler_gem_version = Gem::Version.new(version) + + bundler_gem_version.approximate_recommendation + end + + def load_bundler! + ENV["BUNDLE_GEMFILE"] ||= gemfile + + activate_bundler + end + + def activate_bundler + gem_error = activation_error_handling do + gem "bundler", bundler_requirement + end + return if gem_error.nil? + require_error = activation_error_handling do + require "bundler/version" + end + return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION)) + warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`" + exit 42 + end + + def activation_error_handling + yield + nil + rescue StandardError, LoadError => e + e + end +end + +m.load_bundler! + +if m.invoked_as_script? + load Gem.bin_path("bundler", "bundle") +end diff --git a/examples/ruby-rails-api-app/bin/rails b/examples/ruby-rails-api-app/bin/rails new file mode 100755 index 000000000..efc037749 --- /dev/null +++ b/examples/ruby-rails-api-app/bin/rails @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +APP_PATH = File.expand_path("../config/application", __dir__) +require_relative "../config/boot" +require "rails/commands" diff --git a/examples/ruby-rails-api-app/bin/rake b/examples/ruby-rails-api-app/bin/rake new file mode 100755 index 000000000..4fbf10b96 --- /dev/null +++ b/examples/ruby-rails-api-app/bin/rake @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +require_relative "../config/boot" +require "rake" +Rake.application.run diff --git a/examples/ruby-rails-api-app/bin/setup b/examples/ruby-rails-api-app/bin/setup new file mode 100755 index 000000000..ec47b79b3 --- /dev/null +++ b/examples/ruby-rails-api-app/bin/setup @@ -0,0 +1,33 @@ +#!/usr/bin/env ruby +require "fileutils" + +# path to your application root. +APP_ROOT = File.expand_path("..", __dir__) + +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +FileUtils.chdir APP_ROOT do + # This script is a way to set up or update your development environment automatically. + # This script is idempotent, so that you can run it at any time and get an expectable outcome. + # Add necessary setup steps to this file. + + puts "== Installing dependencies ==" + system! "gem install bundler --conservative" + system("bundle check") || system!("bundle install") + + # puts "\n== Copying sample files ==" + # unless File.exist?("config/database.yml") + # FileUtils.cp "config/database.yml.sample", "config/database.yml" + # end + + puts "\n== Preparing database ==" + system! "bin/rails db:prepare" + + puts "\n== Removing old logs and tempfiles ==" + system! "bin/rails log:clear tmp:clear" + + puts "\n== Restarting application server ==" + system! "bin/rails restart" +end diff --git a/examples/ruby-rails-api-app/config.ru b/examples/ruby-rails-api-app/config.ru new file mode 100644 index 000000000..4a3c09a68 --- /dev/null +++ b/examples/ruby-rails-api-app/config.ru @@ -0,0 +1,6 @@ +# This file is used by Rack-based servers to start the application. + +require_relative "config/environment" + +run Rails.application +Rails.application.load_server diff --git a/examples/ruby-rails-api-app/config/application.rb b/examples/ruby-rails-api-app/config/application.rb new file mode 100644 index 000000000..695fdda09 --- /dev/null +++ b/examples/ruby-rails-api-app/config/application.rb @@ -0,0 +1,27 @@ +require_relative "boot" + +require "rails/all" + +# Require the gems listed in Gemfile, including any gems +# you've limited to :test, :development, or :production. +Bundler.require(*Rails.groups) + +module RubyRailsApiApp + class Application < Rails::Application + # Initialize configuration defaults for originally generated Rails version. + config.load_defaults 7.0 + + # Configuration for the application, engines, and railties goes here. + # + # These settings can be overridden in specific environments using the files + # in config/environments, which are processed later. + # + # config.time_zone = "Central Time (US & Canada)" + # config.eager_load_paths << Rails.root.join("extras") + + # Only loads a smaller set of middleware suitable for API only apps. + # Middleware like session, flash, cookies can be added back manually. + # Skip views, helpers and assets when generating a new resource. + config.api_only = true + end +end diff --git a/examples/ruby-rails-api-app/config/boot.rb b/examples/ruby-rails-api-app/config/boot.rb new file mode 100644 index 000000000..988a5ddc4 --- /dev/null +++ b/examples/ruby-rails-api-app/config/boot.rb @@ -0,0 +1,4 @@ +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +require "bundler/setup" # Set up gems listed in the Gemfile. +require "bootsnap/setup" # Speed up boot time by caching expensive operations. diff --git a/examples/ruby-rails-api-app/config/cable.yml b/examples/ruby-rails-api-app/config/cable.yml new file mode 100644 index 000000000..5e7924119 --- /dev/null +++ b/examples/ruby-rails-api-app/config/cable.yml @@ -0,0 +1,10 @@ +development: + adapter: async + +test: + adapter: test + +production: + adapter: redis + url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> + channel_prefix: RubyRailsApiApp_production diff --git a/examples/ruby-rails-api-app/config/credentials.yml.enc b/examples/ruby-rails-api-app/config/credentials.yml.enc new file mode 100644 index 000000000..1d162f7de --- /dev/null +++ b/examples/ruby-rails-api-app/config/credentials.yml.enc @@ -0,0 +1 @@ +m9sZ/Vtf3IYImgDhC3q4J14k+2EYvwOHkMeDiqaU41uZll8478RQPCzqf3ioRC6fXmCsHambTOg29L38QO+hkCR1r1MIcCP05CbMHXJwkllzabXgo/XnMUdwI4JIx6y05DJuV/teCqT9NdqW87ch3WcNddQDsdF+q4cMVPPcI1hF8gns+k9ny866W1PCwo0RfcIqsGZxNPp8PcLDKKYDWaY5bVK6DHRb5L/7uhcpKTafI0EXWj2pgWnKz8Tn5y5cbiOpyCkLeZVMBZIZk3L7ah5HJ3nQT8WGDagQCha0KbpUAb28KsxrrKhT4A/vZY2CL1xwAi/wf/Z3HLMl6zwcWoE+tfPoBJ07098n0Nqbt9Rfj2yefBKfoYog7ulC9k5jUS5UiG0UdqaOxj1XZ3eb57Bq5FXXlChpRnzy--b5io7kYvRimQBR4F--HPhHrDSWlQwB2DWEwde2Eg== \ No newline at end of file diff --git a/examples/ruby-rails-api-app/config/database.yml b/examples/ruby-rails-api-app/config/database.yml new file mode 100644 index 000000000..fcba57f19 --- /dev/null +++ b/examples/ruby-rails-api-app/config/database.yml @@ -0,0 +1,25 @@ +# SQLite. Versions 3.8.0 and up are supported. +# gem install sqlite3 +# +# Ensure the SQLite 3 gem is defined in your Gemfile +# gem "sqlite3" +# +default: &default + adapter: sqlite3 + pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> + timeout: 5000 + +development: + <<: *default + database: db/development.sqlite3 + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + <<: *default + database: db/test.sqlite3 + +production: + <<: *default + database: db/production.sqlite3 diff --git a/examples/ruby-rails-api-app/config/environment.rb b/examples/ruby-rails-api-app/config/environment.rb new file mode 100644 index 000000000..cac531577 --- /dev/null +++ b/examples/ruby-rails-api-app/config/environment.rb @@ -0,0 +1,5 @@ +# Load the Rails application. +require_relative "application" + +# Initialize the Rails application. +Rails.application.initialize! diff --git a/examples/ruby-rails-api-app/config/environments/development.rb b/examples/ruby-rails-api-app/config/environments/development.rb new file mode 100644 index 000000000..3d6b07360 --- /dev/null +++ b/examples/ruby-rails-api-app/config/environments/development.rb @@ -0,0 +1,65 @@ +require "active_support/core_ext/integer/time" + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # In the development environment your application's code is reloaded any time + # it changes. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.cache_classes = false + + # Do not eager load code on boot. + config.eager_load = false + + # Show full error reports. + config.consider_all_requests_local = true + + # Enable server timing + config.server_timing = true + + # Enable/disable caching. By default caching is disabled. + # Run rails dev:cache to toggle caching. + if Rails.root.join("tmp/caching-dev.txt").exist? + config.cache_store = :memory_store + config.public_file_server.headers = { + "Cache-Control" => "public, max-age=#{2.days.to_i}" + } + else + config.action_controller.perform_caching = false + + config.cache_store = :null_store + end + + # Store uploaded files on the local file system (see config/storage.yml for options). + config.active_storage.service = :local + + # Don't care if the mailer can't send. + config.action_mailer.raise_delivery_errors = false + + config.action_mailer.perform_caching = false + + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log + + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + + # Raise an error on page load if there are pending migrations. + config.active_record.migration_error = :page_load + + # Highlight code that triggered database queries in logs. + config.active_record.verbose_query_logs = true + + + # Raises error for missing translations. + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + # config.action_view.annotate_rendered_view_with_filenames = true + + # Uncomment if you wish to allow Action Cable access from any origin. + # config.action_cable.disable_request_forgery_protection = true +end diff --git a/examples/ruby-rails-api-app/config/environments/production.rb b/examples/ruby-rails-api-app/config/environments/production.rb new file mode 100644 index 000000000..af5ab617f --- /dev/null +++ b/examples/ruby-rails-api-app/config/environments/production.rb @@ -0,0 +1,86 @@ +require "active_support/core_ext/integer/time" + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Code is not reloaded between requests. + config.cache_classes = true + + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both threaded web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. + config.consider_all_requests_local = false + + # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] + # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). + # config.require_master_key = true + + # Disable serving static files from the `/public` folder by default since + # Apache or NGINX already handles this. + config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.asset_host = "http://assets.example.com" + + # Specifies the header that your server uses for sending files. + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache + # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX + + # Store uploaded files on the local file system (see config/storage.yml for options). + config.active_storage.service = :local + + # Mount Action Cable outside main process or domain. + # config.action_cable.mount_path = nil + # config.action_cable.url = "wss://example.com/cable" + # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ] + + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + # config.force_ssl = true + + # Include generic and useful information about system operation, but avoid logging too much + # information to avoid inadvertent exposure of personally identifiable information (PII). + config.log_level = :info + + # Prepend all log lines with the following tags. + config.log_tags = [ :request_id ] + + # Use a different cache store in production. + # config.cache_store = :mem_cache_store + + # Use a real queuing backend for Active Job (and separate queues per environment). + # config.active_job.queue_adapter = :resque + # config.active_job.queue_name_prefix = "RubyRailsApiApp_production" + + config.action_mailer.perform_caching = false + + # Ignore bad email addresses and do not raise email delivery errors. + # Set this to true and configure the email server for immediate delivery to raise delivery errors. + # config.action_mailer.raise_delivery_errors = false + + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation cannot be found). + config.i18n.fallbacks = true + + # Don't log any deprecations. + config.active_support.report_deprecations = false + + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new + + # Use a different logger for distributed setups. + # require "syslog/logger" + # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name") + + if ENV["RAILS_LOG_TO_STDOUT"].present? + logger = ActiveSupport::Logger.new(STDOUT) + logger.formatter = config.log_formatter + config.logger = ActiveSupport::TaggedLogging.new(logger) + end + + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false +end diff --git a/examples/ruby-rails-api-app/config/environments/test.rb b/examples/ruby-rails-api-app/config/environments/test.rb new file mode 100644 index 000000000..6ea4d1e70 --- /dev/null +++ b/examples/ruby-rails-api-app/config/environments/test.rb @@ -0,0 +1,60 @@ +require "active_support/core_ext/integer/time" + +# The test environment is used exclusively to run your application's +# test suite. You never need to work with it otherwise. Remember that +# your test database is "scratch space" for the test suite and is wiped +# and recreated between test runs. Don't rely on the data there! + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Turn false under Spring and add config.action_view.cache_template_loading = true. + config.cache_classes = true + + # Eager loading loads your whole application. When running a single test locally, + # this probably isn't necessary. It's a good idea to do in a continuous integration + # system, or in some way before deploying your code. + config.eager_load = ENV["CI"].present? + + # Configure public file server for tests with Cache-Control for performance. + config.public_file_server.enabled = true + config.public_file_server.headers = { + "Cache-Control" => "public, max-age=#{1.hour.to_i}" + } + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + config.cache_store = :null_store + + # Raise exceptions instead of rendering exception templates. + config.action_dispatch.show_exceptions = false + + # Disable request forgery protection in test environment. + config.action_controller.allow_forgery_protection = false + + # Store uploaded files on the local file system in a temporary directory. + config.active_storage.service = :test + + config.action_mailer.perform_caching = false + + # Tell Action Mailer not to deliver emails to the real world. + # The :test delivery method accumulates sent emails in the + # ActionMailer::Base.deliveries array. + config.action_mailer.delivery_method = :test + + # Print deprecation notices to the stderr. + config.active_support.deprecation = :stderr + + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + + # Raises error for missing translations. + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + # config.action_view.annotate_rendered_view_with_filenames = true +end diff --git a/examples/ruby-rails-api-app/config/initializers/cors.rb b/examples/ruby-rails-api-app/config/initializers/cors.rb new file mode 100644 index 000000000..e5a82f162 --- /dev/null +++ b/examples/ruby-rails-api-app/config/initializers/cors.rb @@ -0,0 +1,16 @@ +# Be sure to restart your server when you modify this file. + +# Avoid CORS issues when API is called from the frontend app. +# Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin AJAX requests. + +# Read more: https://github.com/cyu/rack-cors + +# Rails.application.config.middleware.insert_before 0, Rack::Cors do +# allow do +# origins "example.com" +# +# resource "*", +# headers: :any, +# methods: [:get, :post, :put, :patch, :delete, :options, :head] +# end +# end diff --git a/examples/ruby-rails-api-app/config/initializers/filter_parameter_logging.rb b/examples/ruby-rails-api-app/config/initializers/filter_parameter_logging.rb new file mode 100644 index 000000000..adc6568ce --- /dev/null +++ b/examples/ruby-rails-api-app/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,8 @@ +# Be sure to restart your server when you modify this file. + +# Configure parameters to be filtered from the log file. Use this to limit dissemination of +# sensitive information. See the ActiveSupport::ParameterFilter documentation for supported +# notations and behaviors. +Rails.application.config.filter_parameters += [ + :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn +] diff --git a/examples/ruby-rails-api-app/config/initializers/inflections.rb b/examples/ruby-rails-api-app/config/initializers/inflections.rb new file mode 100644 index 000000000..3860f659e --- /dev/null +++ b/examples/ruby-rails-api-app/config/initializers/inflections.rb @@ -0,0 +1,16 @@ +# Be sure to restart your server when you modify this file. + +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.plural /^(ox)$/i, "\\1en" +# inflect.singular /^(ox)en/i, "\\1" +# inflect.irregular "person", "people" +# inflect.uncountable %w( fish sheep ) +# end + +# These inflection rules are supported but not enabled by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.acronym "RESTful" +# end diff --git a/examples/ruby-rails-api-app/config/locales/en.yml b/examples/ruby-rails-api-app/config/locales/en.yml new file mode 100644 index 000000000..8ca56fc74 --- /dev/null +++ b/examples/ruby-rails-api-app/config/locales/en.yml @@ -0,0 +1,33 @@ +# Files in the config/locales directory are used for internationalization +# and are automatically loaded by Rails. If you want to use locales other +# than English, add the necessary files in this directory. +# +# To use the locales, use `I18n.t`: +# +# I18n.t "hello" +# +# In views, this is aliased to just `t`: +# +# <%= t("hello") %> +# +# To use a different locale, set it with `I18n.locale`: +# +# I18n.locale = :es +# +# This would use the information in config/locales/es.yml. +# +# The following keys must be escaped otherwise they will not be retrieved by +# the default I18n backend: +# +# true, false, on, off, yes, no +# +# Instead, surround them with single quotes. +# +# en: +# "true": "foo" +# +# To learn more, please read the Rails Internationalization guide +# available at https://guides.rubyonrails.org/i18n.html. + +en: + hello: "Hello world" diff --git a/examples/ruby-rails-api-app/config/puma.rb b/examples/ruby-rails-api-app/config/puma.rb new file mode 100644 index 000000000..daaf03699 --- /dev/null +++ b/examples/ruby-rails-api-app/config/puma.rb @@ -0,0 +1,43 @@ +# Puma can serve each request in a thread from an internal thread pool. +# The `threads` method setting takes two numbers: a minimum and maximum. +# Any libraries that use thread pools should be configured to match +# the maximum value specified for Puma. Default is set to 5 threads for minimum +# and maximum; this matches the default thread size of Active Record. +# +max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } +min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } +threads min_threads_count, max_threads_count + +# Specifies the `worker_timeout` threshold that Puma will use to wait before +# terminating a worker in development environments. +# +worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development" + +# Specifies the `port` that Puma will listen on to receive requests; default is 3000. +# +port ENV.fetch("PORT") { 3000 } + +# Specifies the `environment` that Puma will run in. +# +environment ENV.fetch("RAILS_ENV") { "development" } + +# Specifies the `pidfile` that Puma will use. +pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } + +# Specifies the number of `workers` to boot in clustered mode. +# Workers are forked web server processes. If using threads and workers together +# the concurrency of the application would be max `threads` * `workers`. +# Workers do not work on JRuby or Windows (both of which do not support +# processes). +# +# workers ENV.fetch("WEB_CONCURRENCY") { 2 } + +# Use the `preload_app!` method when specifying a `workers` number. +# This directive tells Puma to first boot the application and load code +# before forking the application. This takes advantage of Copy On Write +# process behavior so workers use less memory. +# +# preload_app! + +# Allow puma to be restarted by `bin/rails restart` command. +plugin :tmp_restart diff --git a/examples/ruby-rails-api-app/config/routes.rb b/examples/ruby-rails-api-app/config/routes.rb new file mode 100644 index 000000000..262ffd547 --- /dev/null +++ b/examples/ruby-rails-api-app/config/routes.rb @@ -0,0 +1,6 @@ +Rails.application.routes.draw do + # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html + + # Defines the root path route ("/") + # root "articles#index" +end diff --git a/examples/ruby-rails-api-app/config/storage.yml b/examples/ruby-rails-api-app/config/storage.yml new file mode 100644 index 000000000..4942ab669 --- /dev/null +++ b/examples/ruby-rails-api-app/config/storage.yml @@ -0,0 +1,34 @@ +test: + service: Disk + root: <%= Rails.root.join("tmp/storage") %> + +local: + service: Disk + root: <%= Rails.root.join("storage") %> + +# Use bin/rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key) +# amazon: +# service: S3 +# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %> +# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %> +# region: us-east-1 +# bucket: your_own_bucket-<%= Rails.env %> + +# Remember not to checkin your GCS keyfile to a repository +# google: +# service: GCS +# project: your_project +# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %> +# bucket: your_own_bucket-<%= Rails.env %> + +# Use bin/rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key) +# microsoft: +# service: AzureStorage +# storage_account_name: your_account_name +# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %> +# container: your_container_name-<%= Rails.env %> + +# mirror: +# service: Mirror +# primary: local +# mirrors: [ amazon, google, microsoft ] diff --git a/examples/ruby-rails-api-app/db/seeds.rb b/examples/ruby-rails-api-app/db/seeds.rb new file mode 100644 index 000000000..bc25fce30 --- /dev/null +++ b/examples/ruby-rails-api-app/db/seeds.rb @@ -0,0 +1,7 @@ +# This file should contain all the record creation needed to seed the database with its default values. +# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). +# +# Examples: +# +# movies = Movie.create([{ name: "Star Wars" }, { name: "Lord of the Rings" }]) +# Character.create(name: "Luke", movie: movies.first) diff --git a/examples/ruby-rails-api-app/lib/tasks/.keep b/examples/ruby-rails-api-app/lib/tasks/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/examples/ruby-rails-api-app/log/.keep b/examples/ruby-rails-api-app/log/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/examples/ruby-rails-api-app/public/robots.txt b/examples/ruby-rails-api-app/public/robots.txt new file mode 100644 index 000000000..c19f78ab6 --- /dev/null +++ b/examples/ruby-rails-api-app/public/robots.txt @@ -0,0 +1 @@ +# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file diff --git a/examples/ruby-rails-api-app/storage/.keep b/examples/ruby-rails-api-app/storage/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/examples/ruby-rails-api-app/vendor/.keep b/examples/ruby-rails-api-app/vendor/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/src/providers/ruby.rs b/src/providers/ruby.rs index c38470ac1..91a1b0cdf 100644 --- a/src/providers/ruby.rs +++ b/src/providers/ruby.rs @@ -146,7 +146,12 @@ impl RubyProvider { fn get_build(&self, app: &App) -> Result> { let mut build = Phase::build(None); - if self.is_rails_app(app) { + + // Only compile assets if a Rails app have an asset pipeline gem + // installed (e.g. sprockets, propshaft). Rails API-only apps [0] + // do not come with the asset pipelines because they have no assets. + // [0] https://guides.rubyonrails.org/api_app.html + if self.is_rails_app(app) && self.uses_asset_pipeline(app)? { build.add_cmd("bundle exec rake assets:precompile".to_string()); } @@ -256,6 +261,14 @@ impl RubyProvider { .contains("Rails::Application") } + fn uses_asset_pipeline(&self, app: &App) -> Result { + if app.includes_file("Gemfile") { + let gemfile = app.read_file("Gemfile").unwrap_or_default(); + return Ok(gemfile.contains("sprockets") || gemfile.contains("propshaft")); + } + Ok(false) + } + fn uses_postgres(&self, app: &App) -> Result { if app.includes_file("Gemfile") { let gemfile = app.read_file("Gemfile").unwrap_or_default(); diff --git a/tests/docker_run_tests.rs b/tests/docker_run_tests.rs index 80cce127e..44313ab80 100644 --- a/tests/docker_run_tests.rs +++ b/tests/docker_run_tests.rs @@ -912,6 +912,14 @@ async fn test_ruby_rails() { assert!(output.contains("Rails 7")); } +#[tokio::test] +async fn test_ruby_rails_api_app() { + let name = simple_build("./examples/ruby-rails-api-app").await; + let output = run_image(&name, None).await; + + assert!(output.contains("Rails 7")); +} + #[tokio::test] async fn test_clojure() { let name = simple_build("./examples/clojure").await; diff --git a/tests/snapshots/generate_plan_tests__ruby_rails_api_app.snap b/tests/snapshots/generate_plan_tests__ruby_rails_api_app.snap new file mode 100644 index 000000000..ca883d9ae --- /dev/null +++ b/tests/snapshots/generate_plan_tests__ruby_rails_api_app.snap @@ -0,0 +1,76 @@ +--- +source: tests/generate_plan_tests.rs +expression: plan +--- +{ + "providers": [], + "buildImage": "[build_image]", + "variables": { + "BUNDLE_GEMFILE": "/app/Gemfile", + "GEM_HOME": "/usr/local/rvm/gems/3.1.2", + "GEM_PATH": "/usr/local/rvm/gems/3.1.2:/usr/local/rvm/gems/3.1.2@global", + "MALLOC_ARENA_MAX": "2", + "NIXPACKS_METADATA": "ruby", + "RAILS_LOG_TO_STDOUT": "enabled", + "RAILS_SERVE_STATIC_FILES": "1" + }, + "phases": { + "build": { + "name": "build", + "dependsOn": [ + "install" + ] + }, + "install": { + "name": "install", + "dependsOn": [ + "setup" + ], + "cmds": [ + "bundle install" + ], + "onlyIncludeFiles": [ + "Gemfile", + "Gemfile.lock" + ], + "cacheDirectories": [ + "/root/.bundle/cache" + ], + "paths": [ + "/usr/local/rvm/rubies/3.1.2/bin", + "/usr/local/rvm/gems/3.1.2/bin", + "/usr/local/rvm/gems/3.1.2@global/bin" + ] + }, + "setup": { + "name": "setup", + "aptPkgs": [ + "procps", + "git", + "curl", + "autoconf", + "bison", + "build-essential", + "libssl-dev", + "libyaml-dev", + "libreadline6-dev", + "zlib1g-dev", + "libncurses5-dev", + "libffi-dev", + "libgdbm6", + "libgdbm-dev", + "libdb-dev" + ], + "cmds": [ + "curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash -s stable && printf '\\neval \"$(rbenv init -)\"' >> /root/.profile && . /root/.profile && rbenv install 3.1.2 && rbenv global 3.1.2 && gem install bundler:2.4.2" + ], + "onlyIncludeFiles": [], + "paths": [ + "$HOME/.rbenv/bin" + ] + } + }, + "start": { + "cmd": "rake db:migrate && bundle exec bin/rails server -b 0.0.0.0 -p ${PORT:-3000}" + } +} From e5a1f08179d54bef2c88a69bc1272d1ce668b1ad Mon Sep 17 00:00:00 2001 From: Piper McCorkle Date: Fri, 24 Mar 2023 19:47:11 -0500 Subject: [PATCH 48/61] Improve Nix flake by adding checks, auto-updating version, and fixing build (#843) This will allow the flake to be built using Hydra. --- .github/workflows/ci.yml | 19 ++++++++++++ flake.lock | 67 +++++----------------------------------- flake.nix | 53 +++++++++++++------------------ release.toml | 4 +++ 4 files changed, 52 insertions(+), 91 deletions(-) create mode 100644 release.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 075abcd0f..4ae6bf17b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -182,3 +182,22 @@ jobs: with: command: test args: --package nixpacks --lib --test generate_plan_tests + + flake: + name: Nix Flake + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, '(cargo-release)')" + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.11.0 + with: + access_token: ${{ github.token }} + + - name: Checkout sources + uses: actions/checkout@v3 + + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + + - name: Run nix flake check + run: nix flake check diff --git a/flake.lock b/flake.lock index 563a0e411..6132b149b 100644 --- a/flake.lock +++ b/flake.lock @@ -1,21 +1,6 @@ { "nodes": { "flake-utils": { - "locked": { - "lastModified": 1637014545, - "narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "bba5dcc8e0b20ab664967ad83d24d64cb64ec4f4", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { "locked": { "lastModified": 1644229661, "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", @@ -32,32 +17,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1654275867, - "narHash": "sha256-pt14ZE4jVPGvfB2NynGsl34pgXfOqum5YJNpDK4+b9E=", + "lastModified": 1679472241, + "narHash": "sha256-VK2YDic2NjPvfsuneJCLIrWS38qUfoW8rLLimx0rWXA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7a20c208aacf4964c19186dcad51f89165dc7ed0", + "rev": "9ef6e7727f4c31507627815d4f8679c5841efb00", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-22.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1637453606, - "narHash": "sha256-Gy6cwUswft9xqsjWxFYEnx/63/qzaFUwatcbV5GF/GQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "8afc4e543663ca0a6a4f496262cd05233737e732", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", + "ref": "nixos-22.11", "repo": "nixpkgs", "type": "github" } @@ -65,39 +34,19 @@ "root": { "inputs": { "nixpkgs": "nixpkgs", - "rust-overlay": "rust-overlay", "utils": "utils" } }, - "rust-overlay": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1654742703, - "narHash": "sha256-KoS4Fqyj20G0JzTH3zreFxPE8f+H0fKHxbBiS5FI8a0=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "b37b28553b1009f34fc6ca06ba87329e2a584a98", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, "utils": { "inputs": { - "flake-utils": "flake-utils_2" + "flake-utils": "flake-utils" }, "locked": { - "lastModified": 1652704544, - "narHash": "sha256-UTKE33tYgCmDszaVyWA33a8mtegM5xfH4fH8w4y6TxA=", + "lastModified": 1657226504, + "narHash": "sha256-GIYNjuq4mJlFgqKsZ+YrgzWm0IpA4axA3MCrdKYj7gs=", "owner": "gytis-ivaskevicius", "repo": "flake-utils-plus", - "rev": "f8d6d1f87b6177e3bc674c29f247bdbf897ba274", + "rev": "2bf0f91643c2e5ae38c1b26893ac2927ac9bd82a", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index affb4d17c..401d932e5 100644 --- a/flake.nix +++ b/flake.nix @@ -1,11 +1,10 @@ { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11"; utils.url = "github:gytis-ivaskevicius/flake-utils-plus"; - rust-overlay.url = "github:oxalica/rust-overlay"; }; - outputs = inputs@{ self, utils, rust-overlay, ... }: + outputs = inputs@{ self, utils, ... }: utils.lib.mkFlake rec { inherit self inputs; @@ -17,31 +16,18 @@ "x86_64-linux" ]; - sharedOverlays = [ (import rust-overlay) ]; - - outputsBuilder = channels: with channels; { - packages = with nixpkgs; { - inherit (nixpkgs) package-from-overlays; - - nixpacks = rustPlatform.buildRustPackage { + outputsBuilder = channels: with channels; + let + package = with nixpkgs; rustPlatform.buildRustPackage { pname = "nixpacks"; - version = "v0.3.0"; - doCheck = true; + version = "1.5.1"; src = ./.; - checkInputs = [ rustfmt clippy ]; - # skip `cargo test` due tests FHS dependency - checkPhase = '' - runHook preCheck - - cargo check - rustfmt --check src/**/*.rs - cargo clippy - - runHook postCheck - ''; cargoLock = { lockFile = ./Cargo.lock; }; + # For tooling like rust-analyzer + RUST_SRC_PATH = "${rustPlatform.rustLibSrc}"; + doCheck = false; meta = with nixpkgs.lib; { description = "App source + Nix packages + Docker = Image"; homepage = "https://github.com/railwayapp/nixpacks"; @@ -49,17 +35,20 @@ maintainers = [ maintainers.zoedsoupe ]; }; }; - }; + in { + packages = { + nixpacks = package; + default = package; + }; - devShell = nixpkgs.mkShell { - name = "nixpacks"; + devShells = { + nixpacks = package; + default = package; + }; - buildInputs = with nixpkgs; [ - # rust overlay already comes with complete toolchains - # see more at https://github.com/oxalica/rust-overlay - rust-bin.stable.latest.complete docker - ]; + checks = { + nixpacks = package; + }; }; - }; }; } diff --git a/release.toml b/release.toml new file mode 100644 index 000000000..786ca4031 --- /dev/null +++ b/release.toml @@ -0,0 +1,4 @@ +# Automatically update version in flake.nix on `cargo release` +pre-release-replacements = [ + { file="flake.nix", search="version = \".*\";", replace="version = \"{{version}}\";" }, +] From d6421b3c8d6cb6206fb2d2116d818aeec758d0c4 Mon Sep 17 00:00:00 2001 From: Jake Runzer Date: Fri, 24 Mar 2023 21:03:49 -0400 Subject: [PATCH 49/61] fix snapshot tests after merge (#844) --- tests/snapshots/generate_plan_tests__ruby_rails_api_app.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/snapshots/generate_plan_tests__ruby_rails_api_app.snap b/tests/snapshots/generate_plan_tests__ruby_rails_api_app.snap index ca883d9ae..986801860 100644 --- a/tests/snapshots/generate_plan_tests__ruby_rails_api_app.snap +++ b/tests/snapshots/generate_plan_tests__ruby_rails_api_app.snap @@ -62,7 +62,7 @@ expression: plan "libdb-dev" ], "cmds": [ - "curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash -s stable && printf '\\neval \"$(rbenv init -)\"' >> /root/.profile && . /root/.profile && rbenv install 3.1.2 && rbenv global 3.1.2 && gem install bundler:2.4.2" + "curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash -s stable && printf '\\neval \"$(~/.rbenv/bin/rbenv init -)\"' >> /root/.profile && . /root/.profile && rbenv install 3.1.2 && rbenv global 3.1.2 && gem install bundler:2.4.2" ], "onlyIncludeFiles": [], "paths": [ From a60ed04d332c085a93f9627f76679d3ce64faf97 Mon Sep 17 00:00:00 2001 From: Jake Runzer Date: Fri, 24 Mar 2023 22:02:40 -0400 Subject: [PATCH 50/61] (cargo-release) version 1.6.0 --- Cargo.lock | 2 +- Cargo.toml | 2 +- flake.nix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3190ee227..75a62ad7f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1009,7 +1009,7 @@ dependencies = [ [[package]] name = "nixpacks" -version = "1.5.1" +version = "1.6.0" dependencies = [ "actix-web", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 28d0c2d61..5291aef7b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nixpacks" -version = "1.5.1" +version = "1.6.0" edition = "2021" license = "MIT" authors = ["Railway "] diff --git a/flake.nix b/flake.nix index 401d932e5..83e82978d 100644 --- a/flake.nix +++ b/flake.nix @@ -20,7 +20,7 @@ let package = with nixpkgs; rustPlatform.buildRustPackage { pname = "nixpacks"; - version = "1.5.1"; + version = "1.6.0"; src = ./.; cargoLock = { lockFile = ./Cargo.lock; From ff10bba9a376f2568d9fc85ef98b2819f3defa10 Mon Sep 17 00:00:00 2001 From: Railway Bot Date: Thu, 30 Mar 2023 16:15:02 -0400 Subject: [PATCH 51/61] Bump base image (#848) Co-authored-by: Milo123459 --- src/nixpacks/images.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nixpacks/images.rs b/src/nixpacks/images.rs index 6e0cffbf7..a3c6c2355 100644 --- a/src/nixpacks/images.rs +++ b/src/nixpacks/images.rs @@ -1,5 +1,5 @@ -pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1679356985"; -pub const UBUNTU_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:ubuntu-1679356985"; +pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1679961816"; +pub const UBUNTU_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:ubuntu-1679961816"; pub const DEFAULT_BASE_IMAGE: &str = UBUNTU_BASE_IMAGE; pub const STANDALONE_IMAGE: &str = "ubuntu:jammy"; From 173445b040c72887cb83e8d80e14a990f4a69343 Mon Sep 17 00:00:00 2001 From: Railway Bot Date: Tue, 4 Apr 2023 10:31:40 -0400 Subject: [PATCH 52/61] Bump base image (#852) --- src/nixpacks/images.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nixpacks/images.rs b/src/nixpacks/images.rs index a3c6c2355..ee59f663c 100644 --- a/src/nixpacks/images.rs +++ b/src/nixpacks/images.rs @@ -1,5 +1,5 @@ -pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1679961816"; -pub const UBUNTU_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:ubuntu-1679961816"; +pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1680566572"; +pub const UBUNTU_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:ubuntu-1680566572"; pub const DEFAULT_BASE_IMAGE: &str = UBUNTU_BASE_IMAGE; pub const STANDALONE_IMAGE: &str = "ubuntu:jammy"; From 16bb06ad9af4e8b102329152f1ca1fb2b217b851 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Apr 2023 15:51:28 +0200 Subject: [PATCH 53/61] Bump peter-evans/create-pull-request from 4 to 5 (#853) --- .github/workflows/publish.yml | 2 +- .github/workflows/update-nixpkgs-archive.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8295a4c07..5e91c07a9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -70,7 +70,7 @@ jobs: - name: Create Pull Request if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} - uses: peter-evans/create-pull-request@v4 + uses: peter-evans/create-pull-request@v5 with: base: main token: ${{ secrets.COMMITTER_TOKEN }} diff --git a/.github/workflows/update-nixpkgs-archive.yml b/.github/workflows/update-nixpkgs-archive.yml index d25ae5127..71281ba07 100644 --- a/.github/workflows/update-nixpkgs-archive.yml +++ b/.github/workflows/update-nixpkgs-archive.yml @@ -40,7 +40,7 @@ jobs: echo "::set-output name=url::$URL" - name: Create Pull Request - uses: peter-evans/create-pull-request@v4 + uses: peter-evans/create-pull-request@v5 with: token: ${{ secrets.COMMITTER_TOKEN }} title: Update nixpkgs archive From f39465d13cbd8443ffc013c7eeb4f54e7199e049 Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Fri, 7 Apr 2023 06:13:28 -0400 Subject: [PATCH 54/61] improve failed to find django app name error message (#856) --- src/providers/python.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/providers/python.rs b/src/providers/python.rs index 41039467f..608617798 100644 --- a/src/providers/python.rs +++ b/src/providers/python.rs @@ -266,7 +266,7 @@ impl PythonProvider { } } } - bail!("Failed to find django application name!") + bail!("Failed to find your WSGI_APPLICATION django setting. Add this to continue.") } fn parse_pipfile_python_version(file_content: &str) -> Result> { From 947a417d91cd00b872b4655fc39f595090a6c2d0 Mon Sep 17 00:00:00 2001 From: Jake Runzer Date: Fri, 7 Apr 2023 16:31:16 -0400 Subject: [PATCH 55/61] (cargo-release) version 1.6.1 --- Cargo.lock | 2 +- Cargo.toml | 2 +- flake.nix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 75a62ad7f..768cfac72 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1009,7 +1009,7 @@ dependencies = [ [[package]] name = "nixpacks" -version = "1.6.0" +version = "1.6.1" dependencies = [ "actix-web", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 5291aef7b..9436a7c21 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nixpacks" -version = "1.6.0" +version = "1.6.1" edition = "2021" license = "MIT" authors = ["Railway "] diff --git a/flake.nix b/flake.nix index 83e82978d..b84ca2b17 100644 --- a/flake.nix +++ b/flake.nix @@ -20,7 +20,7 @@ let package = with nixpkgs; rustPlatform.buildRustPackage { pname = "nixpacks"; - version = "1.6.0"; + version = "1.6.1"; src = ./.; cargoLock = { lockFile = ./Cargo.lock; From 51e8b1ccfc5c9a009d0680fb4aef5dbd7bd78846 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Apr 2023 11:40:41 +0100 Subject: [PATCH 56/61] Bump mikepenz/release-changelog-builder-action from 3.7.0 to 3.7.1 (#857) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3478de6b0..64ac12e21 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: - name: Build Changelog id: build_changelog - uses: mikepenz/release-changelog-builder-action@v3.7.0 + uses: mikepenz/release-changelog-builder-action@v3.7.1 with: configuration: ".github/changelog-configuration.json" env: From 8a5dd9f731474fbfe6438f0cc101d546f0763c7c Mon Sep 17 00:00:00 2001 From: Railway Bot Date: Wed, 12 Apr 2023 18:52:48 -0400 Subject: [PATCH 57/61] Bump base image (#860) Co-authored-by: Milo123459 --- src/nixpacks/images.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nixpacks/images.rs b/src/nixpacks/images.rs index ee59f663c..4e52efe27 100644 --- a/src/nixpacks/images.rs +++ b/src/nixpacks/images.rs @@ -1,5 +1,5 @@ -pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1680566572"; -pub const UBUNTU_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:ubuntu-1680566572"; +pub const DEBIAN_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian-1681171363"; +pub const UBUNTU_BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:ubuntu-1681171363"; pub const DEFAULT_BASE_IMAGE: &str = UBUNTU_BASE_IMAGE; pub const STANDALONE_IMAGE: &str = "ubuntu:jammy"; From a6232093ff5b179210d0e6a7747091c5d8ff48e1 Mon Sep 17 00:00:00 2001 From: Piper McCorkle Date: Wed, 12 Apr 2023 17:53:29 -0500 Subject: [PATCH 58/61] Improve Ruby by adding YJIT support, precompiling bootsnap, and installing libvips (#846) * Add rustc dependency to Ruby to enable YJIT * Precompile bootsnap if installed * Update ruby-rails-postgres example to latest Ruby * Install libvips-dev if vips installed * Update gems & bundler for ruby-rails-postgres * Add Ruby 3 example * Update snapshots * Workaround ruby/debug#898 --- CONTRIBUTING.md | 2 +- examples/ruby-3/.ruby-version | 1 + examples/ruby-3/Gemfile | 1 + examples/ruby-3/Gemfile.lock | 12 + examples/ruby-3/Procfile | 1 + examples/ruby-3/app.rb | 6 + examples/ruby-rails-postgres/.ruby-version | 2 +- examples/ruby-rails-postgres/Gemfile | 11 +- examples/ruby-rails-postgres/Gemfile.lock | 224 +++++++++--------- src/providers/ruby.rs | 35 ++- tests/docker_run_tests.rs | 7 + .../snapshots/generate_plan_tests__ruby.snap | 5 + .../generate_plan_tests__ruby_3.snap | 79 ++++++ .../generate_plan_tests__ruby_execjs.snap | 5 + .../generate_plan_tests__ruby_local_deps.snap | 5 + ...nerate_plan_tests__ruby_rails_api_app.snap | 11 +- ...erate_plan_tests__ruby_rails_postgres.snap | 28 ++- .../generate_plan_tests__ruby_sinatra.snap | 5 + .../generate_plan_tests__ruby_with_node.snap | 5 + 19 files changed, 323 insertions(+), 122 deletions(-) create mode 100644 examples/ruby-3/.ruby-version create mode 100644 examples/ruby-3/Gemfile create mode 100644 examples/ruby-3/Gemfile.lock create mode 100644 examples/ruby-3/Procfile create mode 100644 examples/ruby-3/app.rb create mode 100644 tests/snapshots/generate_plan_tests__ruby_3.snap diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5a9c40d2e..ae1393064 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,7 +40,7 @@ cargo install cargo-insta Test and review the generate plan tests. ``` -cargo insta test --review -- --test generate_plan_tests +cargo insta test --review --test generate_plan_tests # or cargo snapshot ``` diff --git a/examples/ruby-3/.ruby-version b/examples/ruby-3/.ruby-version new file mode 100644 index 000000000..e4604e3af --- /dev/null +++ b/examples/ruby-3/.ruby-version @@ -0,0 +1 @@ +3.2.1 diff --git a/examples/ruby-3/Gemfile b/examples/ruby-3/Gemfile new file mode 100644 index 000000000..20b4d4aeb --- /dev/null +++ b/examples/ruby-3/Gemfile @@ -0,0 +1 @@ +source 'https://rubygems.org' diff --git a/examples/ruby-3/Gemfile.lock b/examples/ruby-3/Gemfile.lock new file mode 100644 index 000000000..8605c998f --- /dev/null +++ b/examples/ruby-3/Gemfile.lock @@ -0,0 +1,12 @@ +GEM + remote: https://rubygems.org/ + specs: + +PLATFORMS + arm64-darwin-21 + x86_64-linux + +DEPENDENCIES + +BUNDLED WITH + 2.4.9 diff --git a/examples/ruby-3/Procfile b/examples/ruby-3/Procfile new file mode 100644 index 000000000..17d5903f6 --- /dev/null +++ b/examples/ruby-3/Procfile @@ -0,0 +1 @@ +web: ruby --enable-yjit app.rb diff --git a/examples/ruby-3/app.rb b/examples/ruby-3/app.rb new file mode 100644 index 000000000..7f5bc30a6 --- /dev/null +++ b/examples/ruby-3/app.rb @@ -0,0 +1,6 @@ +if RubyVM::YJIT.enabled? + yjit = "enabled" +else + yjit = "not enabled" +end +puts "Hello from Ruby 3! YJIT is #{yjit}." diff --git a/examples/ruby-rails-postgres/.ruby-version b/examples/ruby-rails-postgres/.ruby-version index ef538c281..e4604e3af 100644 --- a/examples/ruby-rails-postgres/.ruby-version +++ b/examples/ruby-rails-postgres/.ruby-version @@ -1 +1 @@ -3.1.2 +3.2.1 diff --git a/examples/ruby-rails-postgres/Gemfile b/examples/ruby-rails-postgres/Gemfile index 2c54c885c..71e9357b5 100644 --- a/examples/ruby-rails-postgres/Gemfile +++ b/examples/ruby-rails-postgres/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby "3.1.2" +ruby "3.2.1" # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" gem "rails", "~> 7.0.3", ">= 7.0.3.1" @@ -46,11 +46,16 @@ gem "bootsnap", require: false # gem "sassc-rails" # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] -# gem "image_processing", "~> 1.2" +gem "image_processing", "~> 1.2" + +# Ensure the native dependencies for these install properly +gem "mysql2" +gem "charlock_holmes" group :development, :test do # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem - gem "debug", platforms: %i[ mri mingw x64_mingw ] + # Pinned to 1.7.0 to workaround https://github.com/ruby/debug/issues/898 + gem "debug", "1.7.0", platforms: %i[ mri mingw x64_mingw ] end group :development do diff --git a/examples/ruby-rails-postgres/Gemfile.lock b/examples/ruby-rails-postgres/Gemfile.lock index 831650930..74e553b92 100644 --- a/examples/ruby-rails-postgres/Gemfile.lock +++ b/examples/ruby-rails-postgres/Gemfile.lock @@ -1,78 +1,78 @@ GEM remote: https://rubygems.org/ specs: - actioncable (7.0.3.1) - actionpack (= 7.0.3.1) - activesupport (= 7.0.3.1) + actioncable (7.0.4.3) + actionpack (= 7.0.4.3) + activesupport (= 7.0.4.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.3.1) - actionpack (= 7.0.3.1) - activejob (= 7.0.3.1) - activerecord (= 7.0.3.1) - activestorage (= 7.0.3.1) - activesupport (= 7.0.3.1) + actionmailbox (7.0.4.3) + actionpack (= 7.0.4.3) + activejob (= 7.0.4.3) + activerecord (= 7.0.4.3) + activestorage (= 7.0.4.3) + activesupport (= 7.0.4.3) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.3.1) - actionpack (= 7.0.3.1) - actionview (= 7.0.3.1) - activejob (= 7.0.3.1) - activesupport (= 7.0.3.1) + actionmailer (7.0.4.3) + actionpack (= 7.0.4.3) + actionview (= 7.0.4.3) + activejob (= 7.0.4.3) + activesupport (= 7.0.4.3) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.3.1) - actionview (= 7.0.3.1) - activesupport (= 7.0.3.1) + actionpack (7.0.4.3) + actionview (= 7.0.4.3) + activesupport (= 7.0.4.3) rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.3.1) - actionpack (= 7.0.3.1) - activerecord (= 7.0.3.1) - activestorage (= 7.0.3.1) - activesupport (= 7.0.3.1) + actiontext (7.0.4.3) + actionpack (= 7.0.4.3) + activerecord (= 7.0.4.3) + activestorage (= 7.0.4.3) + activesupport (= 7.0.4.3) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.3.1) - activesupport (= 7.0.3.1) + actionview (7.0.4.3) + activesupport (= 7.0.4.3) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.3.1) - activesupport (= 7.0.3.1) + activejob (7.0.4.3) + activesupport (= 7.0.4.3) globalid (>= 0.3.6) - activemodel (7.0.3.1) - activesupport (= 7.0.3.1) - activerecord (7.0.3.1) - activemodel (= 7.0.3.1) - activesupport (= 7.0.3.1) - activestorage (7.0.3.1) - actionpack (= 7.0.3.1) - activejob (= 7.0.3.1) - activerecord (= 7.0.3.1) - activesupport (= 7.0.3.1) + activemodel (7.0.4.3) + activesupport (= 7.0.4.3) + activerecord (7.0.4.3) + activemodel (= 7.0.4.3) + activesupport (= 7.0.4.3) + activestorage (7.0.4.3) + actionpack (= 7.0.4.3) + activejob (= 7.0.4.3) + activerecord (= 7.0.4.3) + activesupport (= 7.0.4.3) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.3.1) + activesupport (7.0.4.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) bindex (0.8.1) - bootsnap (1.12.0) + bootsnap (1.16.0) msgpack (~> 1.2) builder (3.2.4) - capybara (3.37.1) + capybara (3.38.0) addressable matrix mini_mime (>= 0.1.3) @@ -81,125 +81,131 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - childprocess (4.1.0) - concurrent-ruby (1.1.10) + charlock_holmes (0.7.7) + concurrent-ruby (1.2.2) crass (1.0.6) - debug (1.6.1) - irb (>= 1.3.6) + date (3.3.3) + debug (1.7.0) + irb (>= 1.5.0) reline (>= 0.3.1) - digest (3.1.0) - erubi (1.10.0) - globalid (1.0.0) + erubi (1.12.0) + ffi (1.15.5) + globalid (1.1.0) activesupport (>= 5.0) i18n (1.12.0) concurrent-ruby (~> 1.0) - importmap-rails (1.1.3) + image_processing (1.12.2) + mini_magick (>= 4.9.5, < 5) + ruby-vips (>= 2.0.17, < 3) + importmap-rails (1.1.5) actionpack (>= 6.0.0) railties (>= 6.0.0) - io-console (0.5.11) - irb (1.4.1) + io-console (0.6.0) + irb (1.6.3) reline (>= 0.3.0) jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) - loofah (2.18.0) + loofah (2.19.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.7.1) + mail (2.8.1) mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp marcel (1.0.2) matrix (0.4.2) method_source (1.0.0) + mini_magick (4.12.0) mini_mime (1.1.2) - minitest (5.16.2) - msgpack (1.5.3) - net-imap (0.2.3) - digest + minitest (5.18.0) + msgpack (1.6.1) + mysql2 (0.5.5) + net-imap (0.3.4) + date net-protocol - strscan - net-pop (0.1.1) - digest + net-pop (0.1.2) net-protocol + net-protocol (0.2.1) timeout - net-protocol (0.1.3) - timeout - net-smtp (0.3.1) - digest + net-smtp (0.3.3) net-protocol - timeout nio4r (2.5.8) - nokogiri (1.13.7-arm64-darwin) + nokogiri (1.14.2-arm64-darwin) + racc (~> 1.4) + nokogiri (1.14.2-x86_64-linux) racc (~> 1.4) - pg (1.4.1) - public_suffix (4.0.7) - puma (5.6.4) + pg (1.4.6) + public_suffix (5.0.1) + puma (5.6.5) nio4r (~> 2.0) - racc (1.6.0) - rack (2.2.4) - rack-test (2.0.2) + racc (1.6.2) + rack (2.2.6.4) + rack-test (2.1.0) rack (>= 1.3) - rails (7.0.3.1) - actioncable (= 7.0.3.1) - actionmailbox (= 7.0.3.1) - actionmailer (= 7.0.3.1) - actionpack (= 7.0.3.1) - actiontext (= 7.0.3.1) - actionview (= 7.0.3.1) - activejob (= 7.0.3.1) - activemodel (= 7.0.3.1) - activerecord (= 7.0.3.1) - activestorage (= 7.0.3.1) - activesupport (= 7.0.3.1) + rails (7.0.4.3) + actioncable (= 7.0.4.3) + actionmailbox (= 7.0.4.3) + actionmailer (= 7.0.4.3) + actionpack (= 7.0.4.3) + actiontext (= 7.0.4.3) + actionview (= 7.0.4.3) + activejob (= 7.0.4.3) + activemodel (= 7.0.4.3) + activerecord (= 7.0.4.3) + activestorage (= 7.0.4.3) + activesupport (= 7.0.4.3) bundler (>= 1.15.0) - railties (= 7.0.3.1) + railties (= 7.0.4.3) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.4.3) - loofah (~> 2.3) - railties (7.0.3.1) - actionpack (= 7.0.3.1) - activesupport (= 7.0.3.1) + rails-html-sanitizer (1.5.0) + loofah (~> 2.19, >= 2.19.1) + railties (7.0.4.3) + actionpack (= 7.0.4.3) + activesupport (= 7.0.4.3) method_source rake (>= 12.2) thor (~> 1.0) zeitwerk (~> 2.5) rake (13.0.6) - redis (4.7.1) - regexp_parser (2.5.0) - reline (0.3.1) + redis (4.8.1) + regexp_parser (2.7.0) + reline (0.3.2) io-console (~> 0.5) rexml (3.2.5) + ruby-vips (2.1.4) + ffi (~> 1.12) rubyzip (2.3.2) - selenium-webdriver (4.3.0) - childprocess (>= 0.5, < 5.0) + selenium-webdriver (4.8.2) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - sprockets (4.1.1) + sprockets (4.2.0) concurrent-ruby (~> 1.0) - rack (> 1, < 3) + rack (>= 2.2.4, < 4) sprockets-rails (3.4.2) actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - stimulus-rails (1.0.4) + stimulus-rails (1.2.1) railties (>= 6.0.0) - strscan (3.0.3) thor (1.2.1) - timeout (0.3.0) - turbo-rails (1.1.1) + timeout (0.3.2) + turbo-rails (1.4.0) actionpack (>= 6.0.0) activejob (>= 6.0.0) railties (>= 6.0.0) - tzinfo (2.0.4) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) web-console (4.2.0) actionview (>= 6.0.0) activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webdrivers (5.0.0) + webdrivers (5.2.0) nokogiri (~> 1.6) rubyzip (>= 1.3.0) selenium-webdriver (~> 4.0) @@ -209,17 +215,21 @@ GEM websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.0) + zeitwerk (2.6.7) PLATFORMS arm64-darwin-21 + x86_64-linux DEPENDENCIES bootsnap capybara - debug + charlock_holmes + debug (= 1.7.0) + image_processing (~> 1.2) importmap-rails jbuilder + mysql2 pg (~> 1.1) puma (~> 5.0) rails (~> 7.0.3, >= 7.0.3.1) @@ -233,7 +243,7 @@ DEPENDENCIES webdrivers RUBY VERSION - ruby 3.1.2p20 + ruby 3.2.1p31 BUNDLED WITH - 2.3.7 + 2.4.9 diff --git a/src/providers/ruby.rs b/src/providers/ruby.rs index 91a1b0cdf..50de1f324 100644 --- a/src/providers/ruby.rs +++ b/src/providers/ruby.rs @@ -11,6 +11,20 @@ use crate::nixpacks::{ use anyhow::{bail, Ok, Result}; use regex::Regex; +struct RubyVersion { + major: u8, + minor: u8, +} + +impl RubyVersion { + fn parse(version: &str) -> Option { + let mut split = version.split('.'); + let major = split.next()?.parse().ok()?; + let minor = split.next()?.parse().ok()?; + Some(Self { major, minor }) + } +} + pub struct RubyProvider {} const BUNDLE_CACHE_DIR: &str = "/root/.bundle/cache"; @@ -76,6 +90,10 @@ impl RubyProvider { setup.add_nix_pkgs(&[Pkg::new("imagemagick")]); } + if self.uses_gem_dep(app, "vips") { + setup.add_apt_pkgs(vec![String::from("libvips-dev")]); + } + if self.uses_gem_dep(app, "charlock_holmes") { setup.add_apt_pkgs(vec![String::from("libicu-dev")]); } @@ -83,6 +101,13 @@ impl RubyProvider { let ruby_version = self.get_ruby_version(app, env)?; let ruby_version = ruby_version.trim_start_matches("ruby-"); + if let Some(ruby_version) = RubyVersion::parse(ruby_version) { + // YJIT in Ruby 3.1+ requires rustc to install + if ruby_version.major >= 3 && ruby_version.minor >= 1 { + setup.add_nix_pkgs(&[Pkg::new("rustc")]); + } + } + // Packages necessary for rbenv // https://github.com/rbenv/ruby-build/wiki#ubuntudebianmint setup.add_apt_pkgs( @@ -135,6 +160,10 @@ impl RubyProvider { install.add_cmd("bundle install".to_string()); + if self.uses_gem_dep(app, "bootsnap") { + install.add_cmd("bundle exec bootsnap precompile --gemfile"); + } + // Ensure that the ruby executable is in the PATH let ruby_version = self.get_ruby_version(app, env)?; install.add_path(format!("/usr/local/rvm/rubies/{ruby_version}/bin")); @@ -155,6 +184,10 @@ impl RubyProvider { build.add_cmd("bundle exec rake assets:precompile".to_string()); } + if self.is_rails_app(app) && self.uses_gem_dep(app, "bootsnap") { + build.add_cmd("bundle exec bootsnap precompile app/ lib/"); + } + Ok(Some(build)) } @@ -330,7 +363,7 @@ mod test { &App::new("./examples/ruby-rails-postgres")?, &Environment::default(), )?, - "3.1.2" + "3.2.1" ); Ok(()) diff --git a/tests/docker_run_tests.rs b/tests/docker_run_tests.rs index 44313ab80..ee7ba7e2f 100644 --- a/tests/docker_run_tests.rs +++ b/tests/docker_run_tests.rs @@ -851,6 +851,13 @@ async fn test_ruby_2() { assert!(output.contains("Hello from Ruby 2")); } +#[tokio::test] +async fn test_ruby_3() { + let name = simple_build("./examples/ruby-3").await; + let output = run_image(&name, None).await; + assert!(output.contains("Hello from Ruby 3! YJIT is enabled.")); +} + #[tokio::test] async fn test_ruby_sinatra() { let name = simple_build("./examples/ruby-sinatra/").await; diff --git a/tests/snapshots/generate_plan_tests__ruby.snap b/tests/snapshots/generate_plan_tests__ruby.snap index 5efd22dae..77cd7cfff 100644 --- a/tests/snapshots/generate_plan_tests__ruby.snap +++ b/tests/snapshots/generate_plan_tests__ruby.snap @@ -42,6 +42,11 @@ expression: plan }, "setup": { "name": "setup", + "nixPkgs": [ + "rustc" + ], + "nixOverlays": [], + "nixpkgsArchive": "[archive]", "aptPkgs": [ "procps", "git", diff --git a/tests/snapshots/generate_plan_tests__ruby_3.snap b/tests/snapshots/generate_plan_tests__ruby_3.snap new file mode 100644 index 000000000..0eaef8788 --- /dev/null +++ b/tests/snapshots/generate_plan_tests__ruby_3.snap @@ -0,0 +1,79 @@ +--- +source: tests/generate_plan_tests.rs +expression: plan +--- +{ + "providers": [], + "buildImage": "[build_image]", + "variables": { + "BUNDLE_GEMFILE": "/app/Gemfile", + "GEM_HOME": "/usr/local/rvm/gems/3.2.1", + "GEM_PATH": "/usr/local/rvm/gems/3.2.1:/usr/local/rvm/gems/3.2.1@global", + "MALLOC_ARENA_MAX": "2", + "NIXPACKS_METADATA": "ruby" + }, + "phases": { + "build": { + "name": "build", + "dependsOn": [ + "install" + ] + }, + "install": { + "name": "install", + "dependsOn": [ + "setup" + ], + "cmds": [ + "bundle install" + ], + "onlyIncludeFiles": [ + "Gemfile", + "Gemfile.lock" + ], + "cacheDirectories": [ + "/root/.bundle/cache" + ], + "paths": [ + "/usr/local/rvm/rubies/3.2.1/bin", + "/usr/local/rvm/gems/3.2.1/bin", + "/usr/local/rvm/gems/3.2.1@global/bin" + ] + }, + "setup": { + "name": "setup", + "nixPkgs": [ + "rustc" + ], + "nixOverlays": [], + "nixpkgsArchive": "[archive]", + "aptPkgs": [ + "procps", + "git", + "curl", + "autoconf", + "bison", + "build-essential", + "libssl-dev", + "libyaml-dev", + "libreadline6-dev", + "zlib1g-dev", + "libncurses5-dev", + "libffi-dev", + "libgdbm6", + "libgdbm-dev", + "libdb-dev" + ], + "cmds": [ + "curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash -s stable && printf '\\neval \"$(~/.rbenv/bin/rbenv init -)\"' >> /root/.profile && . /root/.profile && rbenv install 3.2.1 && rbenv global 3.2.1 && gem install bundler:2.4.9" + ], + "onlyIncludeFiles": [], + "paths": [ + "$HOME/.rbenv/bin" + ] + } + }, + "start": { + "cmd": "ruby --enable-yjit app.rb" + } +} diff --git a/tests/snapshots/generate_plan_tests__ruby_execjs.snap b/tests/snapshots/generate_plan_tests__ruby_execjs.snap index c7ed44c12..1a199eb4f 100644 --- a/tests/snapshots/generate_plan_tests__ruby_execjs.snap +++ b/tests/snapshots/generate_plan_tests__ruby_execjs.snap @@ -66,6 +66,11 @@ expression: plan }, "setup": { "name": "setup", + "nixPkgs": [ + "rustc" + ], + "nixOverlays": [], + "nixpkgsArchive": "[archive]", "aptPkgs": [ "procps", "git", diff --git a/tests/snapshots/generate_plan_tests__ruby_local_deps.snap b/tests/snapshots/generate_plan_tests__ruby_local_deps.snap index a8d126a61..5638e7066 100644 --- a/tests/snapshots/generate_plan_tests__ruby_local_deps.snap +++ b/tests/snapshots/generate_plan_tests__ruby_local_deps.snap @@ -38,6 +38,11 @@ expression: plan }, "setup": { "name": "setup", + "nixPkgs": [ + "rustc" + ], + "nixOverlays": [], + "nixpkgsArchive": "[archive]", "aptPkgs": [ "procps", "git", diff --git a/tests/snapshots/generate_plan_tests__ruby_rails_api_app.snap b/tests/snapshots/generate_plan_tests__ruby_rails_api_app.snap index 986801860..0cffec7fd 100644 --- a/tests/snapshots/generate_plan_tests__ruby_rails_api_app.snap +++ b/tests/snapshots/generate_plan_tests__ruby_rails_api_app.snap @@ -19,6 +19,9 @@ expression: plan "name": "build", "dependsOn": [ "install" + ], + "cmds": [ + "bundle exec bootsnap precompile app/ lib/" ] }, "install": { @@ -27,7 +30,8 @@ expression: plan "setup" ], "cmds": [ - "bundle install" + "bundle install", + "bundle exec bootsnap precompile --gemfile" ], "onlyIncludeFiles": [ "Gemfile", @@ -44,6 +48,11 @@ expression: plan }, "setup": { "name": "setup", + "nixPkgs": [ + "rustc" + ], + "nixOverlays": [], + "nixpkgsArchive": "[archive]", "aptPkgs": [ "procps", "git", diff --git a/tests/snapshots/generate_plan_tests__ruby_rails_postgres.snap b/tests/snapshots/generate_plan_tests__ruby_rails_postgres.snap index ab7819cc6..036b156ad 100644 --- a/tests/snapshots/generate_plan_tests__ruby_rails_postgres.snap +++ b/tests/snapshots/generate_plan_tests__ruby_rails_postgres.snap @@ -7,8 +7,8 @@ expression: plan "buildImage": "[build_image]", "variables": { "BUNDLE_GEMFILE": "/app/Gemfile", - "GEM_HOME": "/usr/local/rvm/gems/3.1.2", - "GEM_PATH": "/usr/local/rvm/gems/3.1.2:/usr/local/rvm/gems/3.1.2@global", + "GEM_HOME": "/usr/local/rvm/gems/3.2.1", + "GEM_PATH": "/usr/local/rvm/gems/3.2.1:/usr/local/rvm/gems/3.2.1@global", "MALLOC_ARENA_MAX": "2", "NIXPACKS_METADATA": "ruby", "RAILS_LOG_TO_STDOUT": "enabled", @@ -21,7 +21,8 @@ expression: plan "install" ], "cmds": [ - "bundle exec rake assets:precompile" + "bundle exec rake assets:precompile", + "bundle exec bootsnap precompile app/ lib/" ] }, "install": { @@ -30,7 +31,8 @@ expression: plan "setup" ], "cmds": [ - "bundle install" + "bundle install", + "bundle exec bootsnap precompile --gemfile" ], "onlyIncludeFiles": [ "Gemfile", @@ -40,16 +42,26 @@ expression: plan "/root/.bundle/cache" ], "paths": [ - "/usr/local/rvm/rubies/3.1.2/bin", - "/usr/local/rvm/gems/3.1.2/bin", - "/usr/local/rvm/gems/3.1.2@global/bin" + "/usr/local/rvm/rubies/3.2.1/bin", + "/usr/local/rvm/gems/3.2.1/bin", + "/usr/local/rvm/gems/3.2.1@global/bin" ] }, "setup": { "name": "setup", + "nixPkgs": [ + "imagemagick", + "rustc" + ], + "nixOverlays": [], + "nixpkgsArchive": "[archive]", "aptPkgs": [ "procps", "libpq-dev", + "default-libmysqlclient-dev", + "libmagickwand-dev", + "libvips-dev", + "libicu-dev", "git", "curl", "autoconf", @@ -66,7 +78,7 @@ expression: plan "libdb-dev" ], "cmds": [ - "curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash -s stable && printf '\\neval \"$(~/.rbenv/bin/rbenv init -)\"' >> /root/.profile && . /root/.profile && rbenv install 3.1.2 && rbenv global 3.1.2 && gem install bundler:2.3.7" + "curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash -s stable && printf '\\neval \"$(~/.rbenv/bin/rbenv init -)\"' >> /root/.profile && . /root/.profile && rbenv install 3.2.1 && rbenv global 3.2.1 && gem install bundler:2.4.9" ], "onlyIncludeFiles": [], "paths": [ diff --git a/tests/snapshots/generate_plan_tests__ruby_sinatra.snap b/tests/snapshots/generate_plan_tests__ruby_sinatra.snap index 62b035b90..79e746490 100644 --- a/tests/snapshots/generate_plan_tests__ruby_sinatra.snap +++ b/tests/snapshots/generate_plan_tests__ruby_sinatra.snap @@ -42,6 +42,11 @@ expression: plan }, "setup": { "name": "setup", + "nixPkgs": [ + "rustc" + ], + "nixOverlays": [], + "nixpkgsArchive": "[archive]", "aptPkgs": [ "procps", "git", diff --git a/tests/snapshots/generate_plan_tests__ruby_with_node.snap b/tests/snapshots/generate_plan_tests__ruby_with_node.snap index 9aa9aea83..ac82307f0 100644 --- a/tests/snapshots/generate_plan_tests__ruby_with_node.snap +++ b/tests/snapshots/generate_plan_tests__ruby_with_node.snap @@ -69,6 +69,11 @@ expression: plan }, "setup": { "name": "setup", + "nixPkgs": [ + "rustc" + ], + "nixOverlays": [], + "nixpkgsArchive": "[archive]", "aptPkgs": [ "procps", "git", From 38f94a1d8033098a0756b2929ff1def4ad113e3a Mon Sep 17 00:00:00 2001 From: Jake Runzer Date: Tue, 25 Apr 2023 00:47:01 +0800 Subject: [PATCH 59/61] remove unused variable (#864) --- src/main.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index aa27df188..5a65d676f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -153,8 +153,6 @@ enum Commands { #[tokio::main] async fn main() -> Result<()> { - const VERSION: &str = env!("CARGO_PKG_VERSION"); - let args = Args::parse(); let pkgs = args From 669f41b9508a762261ffb43249adec92ce6047a7 Mon Sep 17 00:00:00 2001 From: Jay Heo Date: Tue, 25 Apr 2023 02:13:36 +0900 Subject: [PATCH 60/61] Add `--copies` flag to python venv (#863) Co-authored-by: Jake Runzer --- src/providers/python.rs | 2 +- tests/snapshots/generate_plan_tests__python.snap | 2 +- tests/snapshots/generate_plan_tests__python_django.snap | 2 +- tests/snapshots/generate_plan_tests__python_django_mysql.snap | 2 +- tests/snapshots/generate_plan_tests__python_django_pipfile.snap | 2 +- tests/snapshots/generate_plan_tests__python_numpy.snap | 2 +- tests/snapshots/generate_plan_tests__python_poetry.snap | 2 +- tests/snapshots/generate_plan_tests__python_postgres.snap | 2 +- tests/snapshots/generate_plan_tests__python_procfile.snap | 2 +- tests/snapshots/generate_plan_tests__python_setuptools.snap | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/providers/python.rs b/src/providers/python.rs index 608617798..66e41225e 100644 --- a/src/providers/python.rs +++ b/src/providers/python.rs @@ -140,7 +140,7 @@ impl PythonProvider { fn install(&self, app: &App, _env: &Environment) -> Result> { let env_loc = "/opt/venv"; - let create_env = format!("python -m venv {env_loc}"); + let create_env = format!("python -m venv --copies {env_loc}"); let activate_env = format!(". {env_loc}/bin/activate"); if app.includes_file("requirements.txt") { diff --git a/tests/snapshots/generate_plan_tests__python.snap b/tests/snapshots/generate_plan_tests__python.snap index b38b6e23d..bf497c8c9 100644 --- a/tests/snapshots/generate_plan_tests__python.snap +++ b/tests/snapshots/generate_plan_tests__python.snap @@ -16,7 +16,7 @@ expression: plan "setup" ], "cmds": [ - "python -m venv /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt" + "python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt" ], "cacheDirectories": [ "/root/.cache/pip" diff --git a/tests/snapshots/generate_plan_tests__python_django.snap b/tests/snapshots/generate_plan_tests__python_django.snap index ff1afcfac..ff009eef8 100644 --- a/tests/snapshots/generate_plan_tests__python_django.snap +++ b/tests/snapshots/generate_plan_tests__python_django.snap @@ -16,7 +16,7 @@ expression: plan "setup" ], "cmds": [ - "python -m venv /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt" + "python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt" ], "cacheDirectories": [ "/root/.cache/pip" diff --git a/tests/snapshots/generate_plan_tests__python_django_mysql.snap b/tests/snapshots/generate_plan_tests__python_django_mysql.snap index 5b85a1614..5fcfad295 100644 --- a/tests/snapshots/generate_plan_tests__python_django_mysql.snap +++ b/tests/snapshots/generate_plan_tests__python_django_mysql.snap @@ -16,7 +16,7 @@ expression: plan "setup" ], "cmds": [ - "python -m venv /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt" + "python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt" ], "cacheDirectories": [ "/root/.cache/pip" diff --git a/tests/snapshots/generate_plan_tests__python_django_pipfile.snap b/tests/snapshots/generate_plan_tests__python_django_pipfile.snap index 07411d521..c189d438a 100644 --- a/tests/snapshots/generate_plan_tests__python_django_pipfile.snap +++ b/tests/snapshots/generate_plan_tests__python_django_pipfile.snap @@ -16,7 +16,7 @@ expression: plan "setup" ], "cmds": [ - "python -m venv /opt/venv && . /opt/venv/bin/activate && PIPENV_VENV_IN_PROJECT=1 pipenv install --deploy" + "python -m venv --copies /opt/venv && . /opt/venv/bin/activate && PIPENV_VENV_IN_PROJECT=1 pipenv install --deploy" ], "cacheDirectories": [ "/root/.cache/pip" diff --git a/tests/snapshots/generate_plan_tests__python_numpy.snap b/tests/snapshots/generate_plan_tests__python_numpy.snap index b38b6e23d..bf497c8c9 100644 --- a/tests/snapshots/generate_plan_tests__python_numpy.snap +++ b/tests/snapshots/generate_plan_tests__python_numpy.snap @@ -16,7 +16,7 @@ expression: plan "setup" ], "cmds": [ - "python -m venv /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt" + "python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt" ], "cacheDirectories": [ "/root/.cache/pip" diff --git a/tests/snapshots/generate_plan_tests__python_poetry.snap b/tests/snapshots/generate_plan_tests__python_poetry.snap index 3e529a74a..47cddd293 100644 --- a/tests/snapshots/generate_plan_tests__python_poetry.snap +++ b/tests/snapshots/generate_plan_tests__python_poetry.snap @@ -17,7 +17,7 @@ expression: plan "setup" ], "cmds": [ - "python -m venv /opt/venv && . /opt/venv/bin/activate && pip install poetry==$NIXPACKS_POETRY_VERSION && poetry install --no-dev --no-interaction --no-ansi" + "python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install poetry==$NIXPACKS_POETRY_VERSION && poetry install --no-dev --no-interaction --no-ansi" ], "cacheDirectories": [ "/root/.cache/pip" diff --git a/tests/snapshots/generate_plan_tests__python_postgres.snap b/tests/snapshots/generate_plan_tests__python_postgres.snap index 40da0a019..ba17d8c06 100644 --- a/tests/snapshots/generate_plan_tests__python_postgres.snap +++ b/tests/snapshots/generate_plan_tests__python_postgres.snap @@ -16,7 +16,7 @@ expression: plan "setup" ], "cmds": [ - "python -m venv /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt" + "python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt" ], "cacheDirectories": [ "/root/.cache/pip" diff --git a/tests/snapshots/generate_plan_tests__python_procfile.snap b/tests/snapshots/generate_plan_tests__python_procfile.snap index 513bafe48..1473beb9a 100644 --- a/tests/snapshots/generate_plan_tests__python_procfile.snap +++ b/tests/snapshots/generate_plan_tests__python_procfile.snap @@ -16,7 +16,7 @@ expression: plan "setup" ], "cmds": [ - "python -m venv /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt" + "python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt" ], "cacheDirectories": [ "/root/.cache/pip" diff --git a/tests/snapshots/generate_plan_tests__python_setuptools.snap b/tests/snapshots/generate_plan_tests__python_setuptools.snap index d9c932671..db57a6e55 100644 --- a/tests/snapshots/generate_plan_tests__python_setuptools.snap +++ b/tests/snapshots/generate_plan_tests__python_setuptools.snap @@ -16,7 +16,7 @@ expression: plan "setup" ], "cmds": [ - "python -m venv /opt/venv && . /opt/venv/bin/activate && pip install --upgrade build setuptools && pip install ." + "python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install --upgrade build setuptools && pip install ." ], "onlyIncludeFiles": [ "pyproject.toml" From 2a34bdeb04fde80ea1782b648171b67e401a1cef Mon Sep 17 00:00:00 2001 From: pxseu <57842793+pxseu@users.noreply.github.com> Date: Sat, 29 Apr 2023 23:37:37 +0200 Subject: [PATCH 61/61] chore: disable railways cron ci --- .github/workflows/ci.yml | 18 ++++---- .github/workflows/docs.yml | 18 ++++---- .github/workflows/label-check.yml | 8 ++-- .github/workflows/publish.yml | 48 ++++++++++---------- .github/workflows/stale.yml | 18 ++++---- .github/workflows/update-nixpkgs-archive.yml | 8 ++-- 6 files changed, 59 insertions(+), 59 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ae6bf17b..8212d3511 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,12 @@ -on: - push: - branches: - - main - paths-ignore: - - "docs/**" - pull_request: - paths-ignore: - - "docs/**" +# on: +# push: +# branches: +# - main +# paths-ignore: +# - "docs/**" +# pull_request: +# paths-ignore: +# - "docs/**" name: CI diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f95e77c0f..86608b095 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,12 +1,12 @@ -on: - push: - branches: - - main - paths: - - 'docs/**' - pull_request: - paths: - - 'docs/**' +# on: +# push: +# branches: +# - main +# paths: +# - 'docs/**' +# pull_request: +# paths: +# - 'docs/**' name: Docs diff --git a/.github/workflows/label-check.yml b/.github/workflows/label-check.yml index 00b6118d1..61ed45a2b 100644 --- a/.github/workflows/label-check.yml +++ b/.github/workflows/label-check.yml @@ -1,8 +1,8 @@ name: Release Label Check -on: - pull_request_target: - types: [opened, labeled, unlabeled, synchronize] +# on: +# pull_request_target: +# types: [opened, labeled, unlabeled, synchronize] jobs: label-check: @@ -12,5 +12,5 @@ jobs: with: github-token: "${{ secrets.GITHUB_TOKEN }}" valid-labels: "release/patch, release/minor, release/major, release/skip" - pull-request-number: '${{ github.event.pull_request.number }}' + pull-request-number: "${{ github.event.pull_request.number }}" disable-reviews: true diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5e91c07a9..10c7e66df 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,17 +1,17 @@ -on: - push: - branches: - - main - paths: - - 'base/publish/*' - pull_request: - branches: - - main - paths: - - 'base/publish/*' - schedule: - - cron: '0 0 * * 2' - workflow_dispatch: +# on: +# push: +# branches: +# - main +# paths: +# - 'base/publish/*' +# pull_request: +# branches: +# - main +# paths: +# - 'base/publish/*' +# schedule: +# - cron: '0 0 * * 2' +# workflow_dispatch: name: Publish Debian & Ubuntu Base Images @@ -27,10 +27,10 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v3 - + - name: Set up QEMU uses: docker/setup-qemu-action@v2 - + - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v2 @@ -41,11 +41,11 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - + - name: Get current date id: date run: echo "::set-output name=date::$(date +%s)" - + - name: Build and push [Debian] uses: docker/build-push-action@v4 with: @@ -53,7 +53,7 @@ jobs: platforms: linux/arm64, linux/amd64, linux/386 push: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} tags: ghcr.io/railwayapp/nixpacks:debian, ghcr.io/railwayapp/nixpacks:latest, ghcr.io/railwayapp/nixpacks:debian-${{ steps.date.outputs.date }} - + - name: Build and push [Ubuntu] uses: docker/build-push-action@v4 with: @@ -61,13 +61,13 @@ jobs: platforms: linux/arm64, linux/amd64 push: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} tags: ghcr.io/railwayapp/nixpacks:ubuntu, ghcr.io/railwayapp/nixpacks:ubuntu-${{ steps.date.outputs.date }} - + - name: Bump base image if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} run: | sed -i 's/nixpacks:debian-.*/nixpacks:debian-${{ steps.date.outputs.date }}";/g' src/nixpacks/images.rs sed -i 's/nixpacks:ubuntu-.*/nixpacks:ubuntu-${{ steps.date.outputs.date }}";/g' src/nixpacks/images.rs - + - name: Create Pull Request if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} uses: peter-evans/create-pull-request@v5 @@ -79,13 +79,13 @@ jobs: delete-branch: true title: Bump base images to `${{ steps.date.outputs.date }}` labels: release/patch - + - name: Login to Docker Hub uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - + - name: Build and push to Docker Hub [Debian] uses: docker/build-push-action@v4 with: @@ -100,4 +100,4 @@ jobs: context: base/ubuntu platforms: linux/arm64, linux/amd64 push: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} - tags: railwayapp/nixpacks:ubuntu, railwayapp/nixpacks:ubuntu-${{ steps.date.outputs.date }} \ No newline at end of file + tags: railwayapp/nixpacks:ubuntu, railwayapp/nixpacks:ubuntu-${{ steps.date.outputs.date }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 1f4143f6a..9e90caef4 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,9 +1,9 @@ -name: 'Close stale issues and PRs' +name: "Close stale issues and PRs" -on: - schedule: - - cron: '30 1 * * *' - workflow_dispatch: +# on: +# schedule: +# - cron: '30 1 * * *' +# workflow_dispatch: jobs: stale: @@ -18,9 +18,9 @@ jobs: days-before-pr-close: 5 days-before-issue-stale: -1 # Issues never go stale or close days-before-issue-close: -1 - stale-pr-label: 'stale' - stale-pr-message: 'This pull request is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days' - close-pr-message: 'This pull request was closed for lack of activity. Feel free to reopen later.' - exempt-pr-labels: 'awaiting-approval,work-in-progress' + stale-pr-label: "stale" + stale-pr-message: "This pull request is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days" + close-pr-message: "This pull request was closed for lack of activity. Feel free to reopen later." + exempt-pr-labels: "awaiting-approval,work-in-progress" env: ACTIONS_STEP_DEBUG: true diff --git a/.github/workflows/update-nixpkgs-archive.yml b/.github/workflows/update-nixpkgs-archive.yml index 71281ba07..8b4fefdf6 100644 --- a/.github/workflows/update-nixpkgs-archive.yml +++ b/.github/workflows/update-nixpkgs-archive.yml @@ -1,9 +1,9 @@ name: Update Nixpkgs Archive -on: - schedule: - # Every Monday at 5 PM (UTC) - - cron: '0 17 * * 1' +# on: +# schedule: +# # Every Monday at 5 PM (UTC) +# - cron: '0 17 * * 1' env: BRANCH_NAME: auto-update/nixpkgs-archive