Skip to content

Commit

Permalink
update deps and optimize for midcore
Browse files Browse the repository at this point in the history
  • Loading branch information
pirog committed Dec 9, 2024
1 parent be1025f commit 45b555c
Show file tree
Hide file tree
Showing 27 changed files with 2,192 additions and 1,921 deletions.
19 changes: 16 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
{
"env": {
"node": true,
"mocha": true
"mocha": true,
"es2021": true
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 8,
"requireConfigFile": false
},
"extends": "google",
"extends": [
"eslint:recommended",
"google"
],
"rules": {
"arrow-parens": ["error",
"as-needed"
],
"max-len": ["error", {
"code": 120,
"code": 140,
"ignoreComments": true
}],
"no-empty": ["error", {
"allowEmptyCatch": true
}],
"no-unused-vars": ["error", {
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": false
}],

"require-jsdoc": ["error", {
"require": {
"FunctionDeclaration": true,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-docs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
os:
- ubuntu-24.04
node-version:
- '18'
- '20'
steps:
# Install deps and cache
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
os:
- ubuntu-24.04
node-version:
- '18'
- '20'
steps:
# Install deps and cache
- name: Checkout code
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-symfony-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
- examples/symfony-mysql8
- examples/symfony-nginx
lando-version:
- 3-edge-slim
- 3-edge
os:
- ubuntu-24.04
node-version:
- '18'
- '20'
steps:

- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- ubuntu-24.04
- macos-14
node-version:
- '18'
- '20'
steps:
# Install deps and cache
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.github
.nyc_output
coverage
docs
examples
guides
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})

* Optimized for `midcore`
* Removed unneeded dep `@lando/apache`
* Updated to [@lando/mariadb@1.6.3](https://github.com/lando/mariadb/releases/tag/v1.6.3).
* Updated to [@lando/memcached@1.3.3](https://github.com/lando/mariadb/memcached/tag/v1.3.3).
* Updated to [@lando/mssql@1.4.3](https://github.com/lando/mssql/releases/tag/v1.4.3).
* Updated to [@lando/mysql@1.4.4](https://github.com/lando/mysql/releases/tag/v1.4.4).
* Updated to [@lando/php@1.6.3](https://github.com/lando/php/releases/tag/v1.6.3).
* Updated to [@lando/postgres@1.4.4](https://github.com/lando/postgres/releases/tag/v1.4.4).
* Updated to [@lando/redis@1.2.3](https://github.com/lando/redis/releases/tag/v1.2.3).

## v1.8.3 - [December 6, 2024](https://github.com/lando/symfony/releases/tag/v1.8.3)

* Updated the version index.md to get Docuverse page to build correctly.
Expand Down
4 changes: 2 additions & 2 deletions builders/symfony-mariadb.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const LandoMariadb = require('./../node_modules/@lando/mariadb/builders/mariadb.
module.exports = {
name: 'symfony-mariadb',
parent: '_service',
builder: (parent, config) => class SymfonyMariadb extends LandoMariadb.builder(parent, LandoMariadb.config) {
builder: parent => class SymfonyMariadb extends LandoMariadb.builder(parent, LandoMariadb.config) {
constructor(id, options = {}) {
super(id, options, {services: _.set({}, options.name)});
};
}
},
};
4 changes: 2 additions & 2 deletions builders/symfony-memcached.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const LandoMemcached = require('@lando/memcached/builders/memcached.js');
module.exports = {
name: 'symfony-memcached',
parent: '_service',
builder: (parent, config) => class SymfonyMemcached extends LandoMemcached.builder(parent, LandoMemcached.config) {
builder: parent => class SymfonyMemcached extends LandoMemcached.builder(parent, LandoMemcached.config) {
constructor(id, options = {}) {
super(id, options, {services: _.set({}, options.name)});
};
}
},
};
4 changes: 2 additions & 2 deletions builders/symfony-mssql.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const LandoMssql = require('./../node_modules/@lando/mssql/builders/mssql.js');
module.exports = {
name: 'symfony-mssql',
parent: '_service',
builder: (parent, config) => class SymfonyMssql extends LandoMssql.builder(parent, LandoMssql.config) {
builder: parent => class SymfonyMssql extends LandoMssql.builder(parent, LandoMssql.config) {
constructor(id, options = {}) {
super(id, options, {services: _.set({}, options.name)});
};
}
},
};
4 changes: 2 additions & 2 deletions builders/symfony-mysql.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const LandoMysql = require('./../node_modules/@lando/mysql/builders/mysql.js');
module.exports = {
name: 'symfony-mysql',
parent: '_service',
builder: (parent, config) => class SymfonyMysql extends LandoMysql.builder(parent, LandoMysql.config) {
builder: parent => class SymfonyMysql extends LandoMysql.builder(parent, LandoMysql.config) {
constructor(id, options = {}) {
super(id, options, {services: _.set({}, options.name)});
};
}
},
};
2 changes: 1 addition & 1 deletion builders/symfony-nginx.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ module.exports = {
builder: (parent, config) => class SymfonyNginx extends PhpNginx.builder(parent, PhpNginx.config) {
constructor(id, options = {}) {
super(id, _.merge({}, config, options), {services: _.set({}, options.name)});
};
}
},
};
4 changes: 2 additions & 2 deletions builders/symfony-php.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ const loadScripts = options => {
module.exports = {
name: 'symfony-php',
parent: '_appserver',
builder: (parent, config) => class SymfonyPhp extends LandoPhp.builder(parent, LandoPhp.config) {
builder: parent => class SymfonyPhp extends LandoPhp.builder(parent, LandoPhp.config) {
constructor(id, options = {}, factory) {
loadScripts(options);
options.nginxServiceType = 'symfony-nginx';
super(id, options, factory);
};
}
},
};
4 changes: 2 additions & 2 deletions builders/symfony-postgres.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const LandoPostgres = require('./../node_modules/@lando/postgres/builders/postgr
module.exports = {
name: 'symfony-postgres',
parent: '_service',
builder: (parent, config) => class SymfonyPostgres extends LandoPostgres.builder(parent, LandoPostgres.config) {
builder: parent => class SymfonyPostgres extends LandoPostgres.builder(parent, LandoPostgres.config) {
constructor(id, options = {}) {
super(id, options, {services: _.set({}, options.name)});
};
}
},
};
4 changes: 2 additions & 2 deletions builders/symfony-redis.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const LandoRedis = require('@lando/redis/builders/redis.js');
module.exports = {
name: 'symfony-redis',
parent: '_service',
builder: (parent, config) => class SymfonyRedis extends LandoRedis.builder(parent, LandoRedis.config) {
builder: parent => class SymfonyRedis extends LandoRedis.builder(parent, LandoRedis.config) {
constructor(id, options = {}) {
super(id, options, {services: _.set({}, options.name)});
};
}
},
};
5 changes: 2 additions & 3 deletions builders/symfony.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,11 @@ module.exports = {
confSrc: path.resolve(__dirname, '..', 'config'),
config: {},
composer: {},
database: 'mysql',
database: 'mysql:5.7',
defaultFiles: {
php: 'php.ini',
},
php: '8.2',
database: 'mysql:5.7',
services: {appserver: {overrides: {environment: {
APP_LOG: 'errorlog',
}}}},
Expand Down Expand Up @@ -291,6 +290,6 @@ module.exports = {

// Send downstream
super(id, options);
};
}
},
};
17 changes: 0 additions & 17 deletions copy-examples.sh

This file was deleted.

2 changes: 1 addition & 1 deletion docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default defineConfig({
],
themeConfig: {
multiVersionBuild: {
satisfies: '>=1.0.0',
satisfies: '>=1.8.0',
},
sidebar: sidebar(),
},
Expand Down
8 changes: 4 additions & 4 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ description: Learn how to configure the Lando Laravel recipe.

# Configuration

While Lando [recipes](https://docs.lando.dev/core/v3/recipes.html) set sane defaults so they work out of the box they are also [configurable](https://docs.lando.dev/core/v3/recipes.html#config).
While Lando [recipes](https://docs.lando.dev/landofile/recipes.html) set sane defaults so they work out of the box they are also [configurable](https://docs.lando.dev/landofile/recipes.html#config).

Here are the configuration options, set to the default values, for this recipe. If you are unsure about where this goes or what this means we *highly recommend* scanning the [recipes documentation](https://docs.lando.dev/core/v3/recipes.html) to get a good handle on how the magicks work.
Here are the configuration options, set to the default values, for this recipe. If you are unsure about where this goes or what this means we *highly recommend* scanning the [recipes documentation](https://docs.lando.dev/landofile/recipes.html) to get a good handle on how the magicks work.

```yaml
recipe: symfony
Expand All @@ -25,13 +25,13 @@ config:
vhosts: SEE BELOW
```
Note that if the above config options are not enough all Lando recipes can be further [extended and overriden](https://docs.lando.dev/core/v3/recipes.html#extending-and-overriding-recipes).
Note that if the above config options are not enough all Lando recipes can be further [extended and overriden](https://docs.lando.dev/landofile/recipes.html#extending-and-overriding-recipes).
## Choosing a php version
You can set `php` to any version that is available in our [php service](https://docs.lando.dev/plugins/php). However, you should consult the [Symfony requirements](https://symfony.com/doc/current/setup.html) to make sure that version is actually supported by Symfony itself.

Here is the [recipe config](https://docs.lando.dev/core/v3/recipes.html#config) to set the Symfony recipe to use `php` version `7.3`
Here is the [recipe config](https://docs.lando.dev/landofile/recipes.html#config) to set the Symfony recipe to use `php` version `7.3`

```yaml
recipe: symfony
Expand Down
20 changes: 13 additions & 7 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,25 +91,31 @@ npm run test:unit

We do end to end testing with our made-just-for-Lando testing framework [Leia](https://github.com/lando/leia). Leia allows us to define tests as a series of commented shell commands in human readable markdown files. Here is a simple example:

```md
Start up tests
--------------
````md
## Start up tests

```bash
# Should start up successfully
lando start
```

Verification commands
---------------------
## Verification commands

```bash
# Should be able to connect to all mariadb relationships
lando mariadb main -e "show tables;"
Destroy tests
-------------
# Should do something else
lando exec appserver -- some-command
```

## Destroy tests

```bash
# Should be able to destroy our app
lando destroy -y
```
````

Note that the headers here are important. The _Start up tests_ header specifies things that should run before the main series of tests. _Verification commands_ is the main body of tests and is required. _Destroy tests_ specifies any needed clean up commands to run.

Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ description: Learn how to get started with the Lando Symfony recipe.
Before you get started with this recipe, we assume that you have:

1. [Installed Lando](https://docs.lando.dev/getting-started/installation.html) and gotten familar with [its basics](https://docs.lando.dev/getting-started/)
2. [Initialized](https://docs.lando.dev/cli/init.html) a [Landofile](https://docs.lando.dev/core/v3) for your codebase for use with this recipe
3. Read about the various [services](https://docs.lando.dev/core/v3/lando-service.html), [tooling](https://docs.lando.dev/core/v3/tooling.html), [events](https://docs.lando.dev/core/v3/events.html) and [routing](https://docs.lando.dev/core/v3/proxy.html) Lando offers.
2. [Initialized](https://docs.lando.dev/cli/init.html) a [Landofile](https://docs.lando.dev/landofile/) for your codebase for use with this recipe
3. Read about the various [services](https://docs.lando.dev/services/lando-3.html), [tooling](https://docs.lando.dev/landofile/tooling.html), [events](https://docs.lando.dev/landofile/events.html) and [routing](https://docs.lando.dev/landofile/proxy.html) Lando offers.

## Quick Start

Expand All @@ -37,7 +37,7 @@ lando start
lando info

# Run bin/console commands with: lando console
# Here is how to clear cache;
# Here is how to clear cache;
lando console cache:clear
```

2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ next: ./getting-started.html

Symfony is a PHP framework for web projects.

Lando offers a configurable [recipe](https://docs.lando.dev/core/v3/recipes.html) for developing [Symfony](https://symfony.com/) apps.
Lando offers a configurable [recipe](https://docs.lando.dev/landofile/recipes.html) for developing [Symfony](https://symfony.com/) apps.

#### Features of this plugin:

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
'use strict';

module.exports = lando => {};
module.exports = () => {};
4 changes: 0 additions & 4 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
skipPatterns = [ ".rss", ".gif", ".jpg" ]
checkExternal = true



# Sets our asset optimization
[build.processing.css]
bundle = true
Expand All @@ -41,8 +39,6 @@
[plugins.inputs.audits]
output_path = "reports/lighthouse.html"



# We need this so preview environments and the base site look ok on their own
[[redirects]]
from = "/"
Expand Down
Loading

0 comments on commit 45b555c

Please sign in to comment.