Skip to content

Commit

Permalink
Add memcached support. (#52)
Browse files Browse the repository at this point in the history
* Add memcached support.

* Add memcached testing and update changelog.

* Feed linter.
  • Loading branch information
reynoldsalec authored Feb 21, 2024
1 parent 811f8ef commit a8622ac
Show file tree
Hide file tree
Showing 8 changed files with 484 additions and 680 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v1.2.0 - [February 21, 2024](https://github.com/lando/laravel/releases/tag/v1.2.0)

* Updated memcached plugin to [v1.1.0](https://github.com/lando/memcached/releases/tag/v1.1.0).
* Added testing of memcached.

## v1.1.0 - [February 20, 2024](https://github.com/lando/laravel/releases/tag/v1.1.0)

* Included ability to specify `database: mssql` in the `config` section to maintain backwards compatibility. [@lando/mssql#31](https://github.com/lando/mssql/issues/31)
Expand Down
15 changes: 15 additions & 0 deletions builders/laravel-memcached.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
'use strict';

const _ = require('lodash');
const LandoMemcached = require('@lando/memcached/builders/memcached.js');

// Builder
module.exports = {
name: 'laravel-memcached',
parent: '_service',
builder: (parent, config) => class LaravelMemcached extends LandoMemcached.builder(parent, LandoMemcached.config) {
constructor(id, options = {}) {
super(id, options, {services: _.set({}, options.name)});
};
},
};
2 changes: 1 addition & 1 deletion builders/laravel-php.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const loadScripts = options => {
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);
path.join(landoPhpPath, 'scripts'), confDir);
}
};

Expand Down
1 change: 1 addition & 0 deletions examples/laravel-custom/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ config:
via: nginx:1.17
webroot: bob
database: mysql:5.7
cache: memcached:1.5.12
xdebug: true
config:
database: config/mysql.cnf
Expand Down
3 changes: 3 additions & 0 deletions examples/laravel-custom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ lando mysql -V | grep 5.7
# Should be able to connect to the database with the default creds
lando mysql laravel -e quit

# Should be running memcached 1.5.12
lando ssh -s cache -c "memcached --version | grep 1.5.12"

# Should have xdebug enabled
lando php -m | grep Xdebug

Expand Down
Loading

0 comments on commit a8622ac

Please sign in to comment.