classMySqlGrammar
final class MySqlGrammar
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
MySQL grammar loader.
Loads pre-compiled grammar from the ast/mysql-*.php cache files.
Methods§
public static function load(string|null $version = null): GrammarLoad a pre-compiled MySQL grammar.
Parameters
$version | string|null | MySQL version tag (e.g., "mysql-8.4.7"). Null for default. |
Returns
Test cases 14
Bench::setUpcallsStartRuleResolverTest::testStartSymbolForMapsModernRequestsToLegacyGrammarRulescallsStartRuleResolverTest::testStartSymbolForPreservesGrammarEntryEvenWhenStatementRulesExistcallsStartRuleResolverTest::testStartSymbolForTakesARuleThisReleaseDeclaresAsItStandscallsMySqlGrammarTest::testLoadcallsMySqlGrammarTest::testLoadedGrammarHasExpectedStructurecallsMySqlGrammarTest::testLoadedGrammarStructurecallsMySqlGrammarTest::testLoadedGrammarVersionsProduceDifferentRuleCountscallsMySqlGrammarTest::testLoadPreservesCompiledStructurecallsMySqlGrammarTest::testLoadWithDefaultVersioncallsMySqlGrammarTest::testLoadWithExplicitVersioncallsMySqlGrammarTest::testLoadWithExplicitVersionPreservesCompiledStructurecallsMySqlGrammarTest::testLoadWithNonExistentVersionThrowscallsMySqlGrammarTest::testLoadWithNonExistentVersionThrowsExceptioncalls
Called from 1
Calls 2
- static-call SqlVersion::resolve() line 27
- static-call Grammar::loadFromFile() line 29
public static function resolveVersion(string|null $version = null): stringAnswers the release a version string names, defaulting to the newest one shipped.
Parameters
$version | string|null | Release to resolve, or null for the default |
Returns
string Name of the release the artifacts were generated forThrows
RuntimeException When the release is not one this package shipsTest cases 2
Called from 2
Calls 1
- static-call SqlVersion::resolve() line 43
Test cases 21§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 12
MySqlGrammarTest::testLoadcallsMySqlGrammarTest::testLoadedGrammarHasExpectedStructurecallsMySqlGrammarTest::testLoadedGrammarStructurecallsMySqlGrammarTest::testLoadedGrammarVersionsProduceDifferentRuleCountscallsMySqlGrammarTest::testLoadPreservesCompiledStructurecallsMySqlGrammarTest::testLoadWithDefaultVersioncallsMySqlGrammarTest::testLoadWithExplicitVersioncallsMySqlGrammarTest::testLoadWithExplicitVersionPreservesCompiledStructurecallsMySqlGrammarTest::testLoadWithNonExistentVersionThrowscallsMySqlGrammarTest::testLoadWithNonExistentVersionThrowsExceptioncallsMySqlGrammarTest::testResolveVersionUsesExactConfiguredDefaultcallsMySqlGrammarTest::testResolveVersionUsesExactConfiguredDefaultPreservesCompiledStructurecalls
Other tests reaching this symbol 9
Bench::setUpcallsGenerationContextTestcallsSqlGeneratorFactoryTestcallsStartRuleResolverTest::testStartSymbolForMapsModernRequestsToLegacyGrammarRulescallsStartRuleResolverTest::testStartSymbolForPreservesGrammarEntryEvenWhenStatementRulesExistcallsStartRuleResolverTest::testStartSymbolForTakesARuleThisReleaseDeclaresAsItStandscallsMySqlProviderTestcallsPostgreSqlProviderTestcallsSqliteProviderTestcalls
Relations§
Static calls 3
- static-call SqlFaker\MySql\Generation\GenerationContext::__construct() packages/sql-faker/src/MySql/Generation/GenerationContext.php:53
- static-call SqlFaker\MySql\MySqlProvider::__construct() packages/sql-faker/src/MySql/MySqlProvider.php:71
- static-call SqlFaker\MySql\MySqlProvider::__construct() packages/sql-faker/src/MySql/MySqlProvider.php:72