Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
.vscode
node_modules
npm-debug.log
yarn.lock
composer.phar
var/cache
var/logs
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/public/
/var/
/vendor/
/node_modules/
.DS_Store
.vagrant
.phpunit.result.cache
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git unzip libzip-dev libicu-dev libpng-dev libonig-dev libxml2-dev \
libc-client2007e-dev libkrb5-dev libssl-dev libpq-dev \
libfreetype6-dev libjpeg62-turbo-dev \
&& docker-php-ext-configure intl \
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j"$(nproc)" \
pdo pdo_mysql pdo_pgsql zip intl imap \
pdo pdo_mysql pdo_pgsql zip intl imap gd \
&& rm -rf /var/lib/apt/lists/*

RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt install -y nodejs \
&& npm install -g yarn

# Enable Apache modules and set DocumentRoot to /public
RUN a2enmod rewrite headers \
&& sed -ri 's!/var/www/html!/var/www/html/public!g' /etc/apache2/sites-available/000-default.conf \
Expand All @@ -25,7 +31,7 @@ RUN a2enmod rewrite headers \
&& a2enconf phplist

# Copy composer definition first and install dependencies
COPY composer.json composer.lock ./
COPY composer.json composer.lock package.json yarn.lock ./

# Install Composer
ENV COMPOSER_ALLOW_SUPERUSER=1 \
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,14 @@ You can get a list of all installed phpList modules with this command:
composer run-script list-modules
```

To compile and publish the `phplist/web-frontend` assets into
`public/build` (used by the web frontend Twig templates),
run:

```bash
composer run-script build-web-frontend-assets
```
Comment on lines +154 to +160
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Document the local Node/Yarn prerequisite for this command.

composer run-script build-web-frontend-assets shells out to yarn, so on non-Docker setups this fails unless Node.js and Yarn are installed first. A short prerequisite note here would prevent a confusing first-run error.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 154 - 160, The README is missing a prerequisite note
that `composer run-script build-web-frontend-assets` invokes the `yarn` command;
update the README section around the phplist/web-frontend → public/build
instructions to add a short prerequisite sentence stating that Node.js and Yarn
must be installed locally (or point to Docker usage) before running `composer
run-script build-web-frontend-assets`, mentioning `yarn` explicitly so users
know why those tools are required.



## Creating a .tar.gz package of this distribution

Expand Down
20 changes: 15 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@
],
"require": {
"php": "^8.1",
"phplist/core": "dev-main",
"phplist/rest-api": "dev-main",
"phplist/web-frontend": "dev-main",
"phplist/core": "dev-dev",
"phplist/rest-api": "dev-dev",
"phplist/web-frontend": "dev-feat/campaigns",
"doctrine/orm": "^3.3",
"tatevikgr/rest-api-client": "dev-ISSUE-357",
"tatevikgr/rss-feed": "dev-main as 0.1.0"
"tatevikgr/rest-api-client": "dev-dev",
Comment on lines +47 to +51
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n composer.json | head -60

Repository: phpList/base-distribution

Length of output: 2306


🏁 Script executed:

cat -n composer.json | sed -n '90,120p'

Repository: phpList/base-distribution

Length of output: 1168


🏁 Script executed:

# Check for all dev branch references in composer.json
rg 'dev-[a-z]' composer.json -A 0 -B 0

Repository: phpList/base-distribution

Length of output: 345


🏁 Script executed:

# Check if nelmio/cors-bundle is declared as a dependency
rg 'nelmio/cors-bundle' composer.json

Repository: phpList/base-distribution

Length of output: 51


Pin these package inputs before merging this branch into main.

Multiple dev branch references (dev-dev, dev-feat/campaigns, dev-main, dev-master) on lines 47–52 are moving targets, so the same composer install can resolve different code later without any change in this repo. For a base distribution, that makes releases and bug reports hard to reproduce.

Additionally:

  • The build-web-frontend-assets script (lines 93–96) runs yarn install without a lockfile, causing frontend asset builds to drift.
  • Nelmio\CorsBundle\NelmioCorsBundle is registered in extra.phplist/core.bundles (line 113) but nelmio/cors-bundle is not declared as a Composer dependency, creating a fragile runtime dependency.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@composer.json` around lines 47 - 51, The composer file currently pins several
packages to unstable branch names ("phplist/core" -> dev-dev,
"phplist/web-frontend" -> dev-feat/campaigns, "tatevikgr/rest-api" -> dev-dev)
which are moving targets; replace these dev-branch references with concrete,
versioned tags or commit hashes (e.g., semantic versions or specific shas) for
"phplist/core", "phplist/rest-api", "phplist/web-frontend", and
"tatevikgr/rest-api" before merging. Also update the "build-web-frontend-assets"
script to run yarn with a lockfile present (ensure a yarn.lock is committed and
run "yarn install --frozen-lockfile" or equivalent) to prevent drift, and add
"nelmio/cors-bundle" as a Composer dependency to match the registered bundle
Nelmio\CorsBundle\NelmioCorsBundle in extra.phplist/core.bundles so runtime
resolution is explicit.

"tatevikgr/rss-feed": "dev-main as 0.1.0",
"nelmio/cors-bundle": "^2.6"
},
"require-dev": {
"phpunit/phpunit": "^9.6.33",
Expand Down Expand Up @@ -90,6 +91,10 @@
"php bin/console cache:clear",
"php bin/console cache:warmup"
],
"build-web-frontend-assets": [
"yarn install",
"yarn build:web-frontend"
],
"post-install-cmd": [
"@create-directories",
"@update-configuration"
Expand All @@ -104,6 +109,11 @@
]
},
"extra": {
"phplist/core": {
"bundles": [
"Nelmio\\CorsBundle\\NelmioCorsBundle"
]
},
Comment thread
coderabbitai[bot] marked this conversation as resolved.
"symfony-app-dir": "bin",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
Expand Down
Loading
Loading