Problem/Motivation

After updating to 9.3.1 I get the following errors with any drush command and when trying to load a page.

$ drush updb

In YamlSymfony.php line 40:
                                               
  Unable to parse at line 1765 (near "test").  
                                               

In Parser.php line 491:
                                               
  Unable to parse at line 1765 (near "test").  

Steps to reproduce

Update to core-recommended 9.3.1 and run drush commands
Reverting back to 9.3.0 fixes the issue.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

minorOffense created an issue. See original summary.

greatmatter’s picture

This is caused by the word "test" being at the end of
/core/core.services.yml

Shawn DeArmond’s picture

I also get this when trying to install a site.

Drupal\Component\Serialization\Exception\InvalidDataTypeException: Unable to parse at line 1765 (near "test"). in Drupal\Component\Serialization\YamlSymfony::decode() (line 40 of /var/www/docroot/core/lib/Drupal/Component/Serialization/YamlSymfony.php).

Drupal\Component\Serialization\YamlSymfony::decode('parameters:
  # The app.root and site.path parameters are dynamically set by
  # \Drupal\Core\DrupalKernel::initializeContainer(). They are listed here to
  # allow IDEs to autocomplete them when writing new service YAML files.
...

It appears that the yml file in question is core.services.yml.

Line 1765 has a single word: test

I removed that line and it worked.

cburschka’s picture

Priority: Normal » Critical

Looks like an accidental change in the commit that tagged 9.3.1: https://git.drupalcode.org/project/drupal/-/commit/009111e

Edit: The strange thing is that the change currently in the commit log also apparently releasing 9.3.1 is clean and has the same parent, and is ten minutes later than the first one: https://git.drupalcode.org/project/drupal/-/commit/2c712eb

The former is what the 9.3.1 tag points to. I'm guessing the only way to fix this now is to tag a 9.3.2 hotfix.

cilefen’s picture

Title: Update to 9.3.1 seems to break something when loading YamlSymfony.php » 9.3.1 contains an errant statement in core.services.yml that breaks sites
Component: bootstrap system » base system
xjm’s picture

Okay I watched this issue get fixed twice after a previous test run, and we read core.services.yml together to make sure it was not there anymore. ??? I'll roll a hotfix release to fix this.

xjm’s picture

Status: Active » Fixed

The errant test text was reverted in the "back to dev" commit I guess, so no other changes are required to fix this. Edit: I think actually that a tag from a previous test run didn't get cleaned up, so the tag contains commits that don't actually exist in HEAD! Evil git magic.

I've tagged 9.3.2, which is packaging and should be available shortly to resolve the issue.

Thanks for reporting it so quickly!

milan.durovic’s picture

Something is not quite right with this upgrade even after 9.3.2. I was upgrading from 9.3.0 to 9.3.2 using Compser and I get a few warnings and error messages. The warning is:

Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.

And the error message is:

[RuntimeException]
Could not delete /var/www/sites/drupal8/sites/default/default.services.yml: PHP Startup: Unable to load dynamic library 'pdo_mysql.so' (tried: /usr/lib64/php7/extensi
ons/pdo_mysql.so (/usr/lib64/php7/extensions/pdo_mysql.so: cannot open shared object file: No such file or directory), /usr/lib64/php7/extensions/pdo_mysql.so.so (/us
r/lib64/php7/extensions/pdo_mysql.so.so: cannot open shared object file: No such file or directory))

My site is backed by PostgreSQL and I never had mysql on my system, so it seems that the upgrade or something else is asking for MySQL - why? Previously, it also complained about missing *sockets* extension (again, I don't use it, it was never installed on the system), so that must be another one, too.

xjm’s picture

@milan.durovic, the messages in #8 are not related to the core release, so I'd suggest opening a separate support request. The messages in the first paragraph are from upstream dependencies, not Drupal, and it's not surprising if you haven't seen them before because they've probably only been added recently. The stuff in the second paragraph sounds like a database configuration issue; check your settings.php. But in any case, should not be discussed here since the issue scope is as described in the title. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.