diff --git a/CHANGELOG.md b/CHANGELOG.md index 95af926..b447fcd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }}) +* Updated lando/php to v1.7.1. + ## v1.8.0 - [December 9, 2024](https://github.com/lando/joomla/releases/tag/v1.8.0) * Optimized for `midcore` diff --git a/builders/joomla-php.js b/builders/joomla-php.js index bf7e15f..17baa22 100644 --- a/builders/joomla-php.js +++ b/builders/joomla-php.js @@ -1,32 +1,33 @@ 'use strict'; -const _ = require('lodash'); -const fs = require('fs'); const path = require('path'); const landoPhpPath = path.join(__dirname, '../node_modules/@lando/php'); const LandoPhp = require(`${landoPhpPath}/builders/php.js`); -const loadScripts = options => { - const lando = _.get(options, '_app._lando'); - // Move the script to the confDir and make executable. - if (fs.existsSync(path.join(landoPhpPath, 'scripts'))) { - const confDir = path.join(lando.config.userConfRoot, 'scripts'); - const dest = lando.utils.moveConfig(path.join(landoPhpPath, 'scripts'), confDir); - lando.utils.makeExecutable(fs.readdirSync(dest), dest); - lando.log.debug('automoved scripts from %s to %s and set to mode 755', - path.join(landoPhpPath, 'scripts'), confDir); - } -}; - -// Builder +/** + * Joomla PHP builder class that extends Lando PHP builder. + * Uses the bundled version of @lando/php plugin instead of user's version. + * + * @module joomla-php + */ module.exports = { name: 'joomla-php', parent: '_appserver', - builder: (parent, config) => class JoomlaPhp extends LandoPhp.builder(parent, LandoPhp.config) { + /** + * Builder function that returns the JoomlaPhp class + * @param {Object} parent - Parent builder class + * @return {Class} JoomlaPhp class extending LandoPhp builder + */ + builder: parent => class JoomlaPhp extends LandoPhp.builder(parent, LandoPhp.config) { + /** + * Create a new JoomlaPhp instance + * @param {string} id - Service id + * @param {Object} options - Service options + * @param {Object} factory - App factory instance + */ constructor(id, options = {}, factory) { - loadScripts(options); options.nginxServiceType = 'joomla-nginx'; - super(id, _.merge({}, config, options), factory); + super(id, options, factory); } }, }; diff --git a/package-lock.json b/package-lock.json index da785e2..2309aac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,13 +6,13 @@ "packages": { "": { "name": "@lando/joomla", - "version": "1.7.3", + "version": "1.8.0", "license": "GPL-3.0", "dependencies": { "@lando/mariadb": "^1.6.3", "@lando/mssql": "^1.4.3", "@lando/mysql": "^1.4.4", - "@lando/php": "^1.6.3", + "@lando/php": "^1.7.1", "@lando/postgres": "^1.4.4", "lodash": "^4.17.21" }, @@ -1472,15 +1472,14 @@ "license": "MIT" }, "node_modules/@lando/php": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/@lando/php/-/php-1.6.3.tgz", - "integrity": "sha512-UIYJ5fh2hCTQDal17UxuT+8A+CvEEfnjNtrXObArsb1G4qXrJdwwF9G3boQ57L3aj8Y5eLSmgClBC1wMw4xOUw==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@lando/php/-/php-1.7.1.tgz", + "integrity": "sha512-yndqYlVy51k0GWVwbNas4MvY0mXTYyC9XJeUnyyx7kzX84j3TwnLt8/MYHXMaP6e/SsMp1nrb3Isi11NKYDrtg==", "bundleDependencies": [ "@lando/nginx", "lodash", "semver" ], - "license": "GPL-3.0", "dependencies": { "@lando/nginx": "^1.4.4", "lodash": "^4.17.21", @@ -7593,6 +7592,7 @@ "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" diff --git a/package.json b/package.json index fbd5353..98ce45e 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@lando/mariadb": "^1.6.3", "@lando/mssql": "^1.4.3", "@lando/mysql": "^1.4.4", - "@lando/php": "^1.6.3", + "@lando/php": "^1.7.1", "@lando/postgres": "^1.4.4", "lodash": "^4.17.21" },