Skip to content

Commit

Permalink
feat: add php (#3725)
Browse files Browse the repository at this point in the history
* feat: add php

* fix: nsjail + frontend build
  • Loading branch information
HugoCasa authored May 15, 2024
1 parent 4c70c6a commit 6e805d8
Show file tree
Hide file tree
Showing 49 changed files with 1,108 additions and 52 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ COPY --from=downloader --chmod=755 /deno /usr/bin/deno

COPY --from=oven/bun:1.1.7 /usr/local/bin/bun /usr/bin/bun

COPY --from=php:8.3.7-cli /usr/local/bin/php /usr/bin/php
COPY --from=composer:2.7.6 /usr/bin/composer /usr/bin/composer

# add the docker client to call docker from a worker if enabled
COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/

Expand Down

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

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

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

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

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

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

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

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

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

44 changes: 44 additions & 0 deletions backend/Cargo.lock

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

2 changes: 2 additions & 0 deletions backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ windmill-parser-go = { path = "./parsers/windmill-parser-go" }
windmill-parser-bash = { path = "./parsers/windmill-parser-bash" }
windmill-parser-sql = { path = "./parsers/windmill-parser-sql" }
windmill-parser-graphql = { path = "./parsers/windmill-parser-graphql" }
windmill-parser-php = { path = "./parsers/windmill-parser-php" }
windmill-api-client = { path = "./windmill-api-client" }

axum = { version = "^0.7", features = ["multipart"] }
Expand Down Expand Up @@ -139,6 +140,7 @@ rand_core = { version = "^0", features = ["std"] }
magic-crypt = "^3"
git-version = "^0"
rustpython-parser = { git = "https://github.com/RustPython/Parser", rev = "9ce55aefdeb35e2f706ce0b02d5a2dfe6295fc57" }
php-parser-rs = { git = "https://github.com/php-rust-tools/parser", rev = "ec4cb411dec09450946ef57920b7ffced7f6495d" }
cron = "^0"
mail-send = { version = "0.4.0", features = ["builder"], default-features=false }
urlencoding = "^2"
Expand Down
1 change: 1 addition & 0 deletions backend/migrations/20240513125035_add_php_lang.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-- Add down migration script here
2 changes: 2 additions & 0 deletions backend/migrations/20240513125035_add_php_lang.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Add up migration script here
ALTER TYPE SCRIPT_LANG ADD VALUE IF NOT EXISTS 'php';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-- Add down migration script here
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- Add up migration script here
UPDATE config set config = '{"worker_tags": ["deno", "python3", "go", "bash", "powershell", "dependency", "flow", "hub", "other", "bun", "php"]}'::jsonb where name = 'worker__default' and config @> '{"worker_tags": ["deno", "python3", "go", "bash", "powershell", "dependency", "flow", "hub", "other", "bun"]}'::jsonb;
UPDATE workspace_settings SET default_scripts = jsonb_set(default_scripts, '{order}', default_scripts->'order' || '["php"]'::jsonb) WHERE default_scripts IS NOT NULL AND default_scripts->'order' IS NOT NULL AND NOT default_scripts->'order' @> '["php"]'::jsonb;

19 changes: 19 additions & 0 deletions backend/parsers/windmill-parser-php/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[package]
name = "windmill-parser-php"
version.workspace = true
edition.workspace = true
authors.workspace = true

[lib]
name = "windmill_parser_php"
path = "./src/lib.rs"

[dependencies]
windmill-parser.workspace = true
itertools.workspace = true
serde_json.workspace = true
anyhow.workspace = true
php-parser-rs.workspace = true
convert_case.workspace = true
lazy_static.workspace = true
regex.workspace = true
Loading

0 comments on commit 6e805d8

Please sign in to comment.