Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symfony Recipe Error: Could not find a service builder called symfony-mssql #31

Closed
EsliManta opened this issue Feb 19, 2024 · 3 comments · Fixed by #32
Closed

Symfony Recipe Error: Could not find a service builder called symfony-mssql #31

EsliManta opened this issue Feb 19, 2024 · 3 comments · Fixed by #32
Labels
bug Something isn't working

Comments

@EsliManta
Copy link

Hello,

I just updated lando to v3.21.0-beta.1 and now whenever I try to run my symfony + mssql project, the following error arises ERROR ==> Could not find a service builder called symfony-mssql in the builder registry!. This error occurs both when running lando start and lando rebuild

I have ran lando setup and lando update however they both report no additional setup is required.

Here is a .lando.yml file for reproducing:

name: symfony_mssql
recipe: symfony
config:
  php: 8.1
  via: nginx
  webroot: public
  database: mssql:2019-latest
  xdebug: 'develop,debug,profile'

Any help greatly appreciated 🙏

@pirog pirog transferred this issue from lando/lando Feb 19, 2024
@reynoldsalec reynoldsalec changed the title Lando fails to run or build Symfony Recipe Error: Could not find a service builder called symfony-mssql Feb 20, 2024
@reynoldsalec
Copy link
Member

Interesting, support for mssql as a database config option was never documented, but our architecture around specifying a database type never "filtered" acceptable DB options, so essentially anything you put in there would get passed in as the service type...hence why mssql worked before.

With the new plugin architecture we plugin instances from a recipe-specific plugin version to ensure compatibility. That's only set-up for the supported DB options from the docs.

I thought that adding support for mssql in the symfony recipe would be the best idea, but I found a funny issue: when I do that, it sets the password to symfony, which is less than the 8 characters mssql requires for the admin password. Have you had this issue @EsliManta/did you have something in your Landofile to get around it?

@reynoldsalec reynoldsalec added bug Something isn't working and removed Needs Triage labels Feb 20, 2024
@EsliManta
Copy link
Author

EsliManta commented Feb 20, 2024

@reynoldsalec That makes sense, thanks for explaining. and yeah that does ring a bell, I just checked my .lando file and I've got this section in it:

services:
  database:
    creds:
      password: L4ndoSymfony! #needs to be 8 characters minimum with special characters
    portforward: 21273
    build_as_root:
      - sqlcmd -Slocalhost -Usa -PL4ndoSymfony! -Q "IF NOT EXISTS (select * from sys.databases where name='symfony') BEGIN CREATE DATABASE [symfony] END"

I was having issues with the database not being created properly, so it's not the prettiest lando file 😬 but it gets the job done.
sidenote: can't change the username from sa afaik

@reynoldsalec
Copy link
Member

Sweet that makes sense @EsliManta, thanks!

I'm going to move forward with my plan to add "back" out-of-box mssql compatibility for symfony (and other lamp-y recipes). I'll document this password issue in the mssql docs, since it would also impact folks who manually override the database service to change its type and I feel like that usecase should be supported.

If you run lando update and accept the update to @lando/symfony@v1.2.0 you should be back in business!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants