Skip to content

Commit a8622ac

Browse files
authored
Add memcached support. (#52)
* Add memcached support. * Add memcached testing and update changelog. * Feed linter.
1 parent 811f8ef commit a8622ac

File tree

8 files changed

+484
-680
lines changed

8 files changed

+484
-680
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## v1.2.0 - [February 21, 2024](https://github.com/lando/laravel/releases/tag/v1.2.0)
2+
3+
* Updated memcached plugin to [v1.1.0](https://github.com/lando/memcached/releases/tag/v1.1.0).
4+
* Added testing of memcached.
5+
16
## v1.1.0 - [February 20, 2024](https://github.com/lando/laravel/releases/tag/v1.1.0)
27

38
* Included ability to specify `database: mssql` in the `config` section to maintain backwards compatibility. [@lando/mssql#31](https://github.com/lando/mssql/issues/31)

builders/laravel-memcached.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
'use strict';
2+
3+
const _ = require('lodash');
4+
const LandoMemcached = require('@lando/memcached/builders/memcached.js');
5+
6+
// Builder
7+
module.exports = {
8+
name: 'laravel-memcached',
9+
parent: '_service',
10+
builder: (parent, config) => class LaravelMemcached extends LandoMemcached.builder(parent, LandoMemcached.config) {
11+
constructor(id, options = {}) {
12+
super(id, options, {services: _.set({}, options.name)});
13+
};
14+
},
15+
};

builders/laravel-php.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const loadScripts = options => {
1414
const dest = lando.utils.moveConfig(path.join(landoPhpPath, 'scripts'), confDir);
1515
lando.utils.makeExecutable(fs.readdirSync(dest), dest);
1616
lando.log.debug('automoved scripts from %s to %s and set to mode 755',
17-
path.join(landoPhpPath, 'scripts'), confDir);
17+
path.join(landoPhpPath, 'scripts'), confDir);
1818
}
1919
};
2020

examples/laravel-custom/.lando.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ config:
66
via: nginx:1.17
77
webroot: bob
88
database: mysql:5.7
9+
cache: memcached:1.5.12
910
xdebug: true
1011
config:
1112
database: config/mysql.cnf

examples/laravel-custom/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ lando mysql -V | grep 5.7
4040
# Should be able to connect to the database with the default creds
4141
lando mysql laravel -e quit
4242

43+
# Should be running memcached 1.5.12
44+
lando ssh -s cache -c "memcached --version | grep 1.5.12"
45+
4346
# Should have xdebug enabled
4447
lando php -m | grep Xdebug
4548

0 commit comments

Comments
 (0)