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

VERISON 8.2.3 -> bin/console cache:clear throws a syntax error, unexpected 'RouteMatcherInterface' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) #202

Closed
lukio opened this issue Jan 27, 2023 · 2 comments
Assignees
Labels
Area: Environment Issues & PRs related to the application environment Priority:Important Issues & PRs that are important; broken functions; errors; there are workarounds Status: Fix Proposed A issue that has a PR related to it that provides a possible resolution Type:Bug Something isn't working

Comments

@lukio
Copy link
Contributor

lukio commented Jan 27, 2023

Issue

After update to 8.2.3 I ran the command bin/console and throws a syntax error.

./bin/console cache:clear                                  
ParseError {#2293                                          
  #message: "syntax error, unexpected 'RouteMatcherInterface' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)"                                                                                                                  
  #code: 0                                                 
  #file: "./core/backend/Security/CSRFCookieListener.php"                                                              
  #line: 75                                                
  trace: {                                                 
    ./core/backend/Security/CSRFCookieListener.php:75 {                                                                
      Symfony\Component\ErrorHandler\DebugClassLoader->loadClass(string $class): void^                                                                                                                                                         
      ›  */                                                
      › private RouteMatcherInterface $routeMatcher;                                                                   
      ›                                                    
    }                                                      
    Symfony\Component\ErrorHandler\DebugClassLoader->loadClass() {}                                                    
    spl_autoload_call() {}                                 
    ./vendor/symfony/config/Resource/ClassExistenceResource.php:81 { …}                                                
    ./vendor/symfony/dependency-injection/ContainerBuilder.php:348 { …}                                                
    ./vendor/symfony/dependency-injection/Loader/FileLoader.php:199 { …}                                               
    ./vendor/symfony/dependency-injection/Loader/FileLoader.php:99 { …}                                                
    ./vendor/symfony/dependency-injection/Loader/YamlFileLoader.php:672 { …}                                           
    ./vendor/symfony/dependency-injection/Loader/YamlFileLoader.php:235 { …}                                           
    ./vendor/symfony/dependency-injection/Loader/YamlFileLoader.php:155 { …}                                           
    ./vendor/symfony/config/Loader/FileLoader.php:158 { …}                                                             
    ./vendor/symfony/config/Loader/FileLoader.php:97 { …}                                                              
    ./vendor/symfony/dependency-injection/Loader/FileLoader.php:64 { …}                                                
    ./vendor/symfony/dependency-injection/Loader/YamlFileLoader.php:198 { …}                                           
    ./vendor/symfony/dependency-injection/Loader/YamlFileLoader.php:134 { …}                                           
    ./vendor/symfony/config/Loader/FileLoader.php:158 { …}                                                             
    ./vendor/symfony/config/Loader/FileLoader.php:97 { …}                                                              
    ./vendor/symfony/dependency-injection/Loader/FileLoader.php:64 { …}                                                
    ./vendor/symfony/dependency-injection/Loader/GlobFileLoader.php:27 { …}                                            
    ./vendor/symfony/config/Loader/DelegatingLoader.php:40 { …}                                                        
    ./core/backend/Kernel.php:101 { …}                     
    ./vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php:138 { …}                                             
    ./vendor/symfony/dependency-injection/Loader/ClosureLoader.php:38 { …}                                             
    ./vendor/symfony/config/Loader/DelegatingLoader.php:40 { …}                                                        
    ./vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php:163 { …}                                             
    ./vendor/symfony/http-kernel/Kernel.php:644 { …}                                                                   
    ./vendor/symfony/http-kernel/Kernel.php:540 { …}                                                                   
    ./vendor/symfony/http-kernel/Kernel.php:780 { …}                                                                   
    ./vendor/symfony/http-kernel/Kernel.php:121 { …}                                                                   
    ./vendor/symfony/framework-bundle/Console/Application.php:168 { …}                                                 
    ./vendor/symfony/framework-bundle/Console/Application.php:74 { …}                                                  
    ./vendor/symfony/console/Application.php:166 { …}                                                                  
    ./bin/console:42 { …}                                  
  }                                                        
}                                                          
2023-01-27T07:02:51-03:00 [critical] Uncaught Error: syntax error, unexpected 'RouteMatcherInterface' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)    

Context

Your Environment

  • SuiteCRM Version used: 8.2.3
  • Browser name and version: Mozilla Firefox 109.0
  • Environment name and version: PHP 7.3.33 (cli) (built: Mar 18 2022 03:07:25) ( NTS )
  • Operating System and version: Debian 11.5
@lukio lukio changed the title run bin/console cache:clear throws a syntax error syntax error, unexpected 'RouteMatcherInterface' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) VERISON 8.2.3 -> bin/console cache:clear throws a syntax error, unexpected 'RouteMatcherInterface' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) Jan 27, 2023
@lukio
Copy link
Contributor Author

lukio commented Jan 27, 2023

Hi, I found that class typed properties work since version PHP 7.4.x.

More information: https://stitcher.io/blog/typed-properties-in-php-74

@lukio
Copy link
Contributor Author

lukio commented Jan 27, 2023

Hi, I found that class typed properties work since version PHP 7.4.x.

More information: https://stitcher.io/blog/typed-properties-in-php-74

I understand that DEPRECATION of PHP 7.3 would be since 8.3 VERSION as said at the roadmap

cc @clemente-raposo @mattlorimer

@lukio lukio added the Status: Fix Proposed A issue that has a PR related to it that provides a possible resolution label Jan 27, 2023
@lukio lukio self-assigned this Jan 27, 2023
@johnM2401 johnM2401 added Type:Bug Something isn't working Priority:Important Issues & PRs that are important; broken functions; errors; there are workarounds Area: Environment Issues & PRs related to the application environment labels Jan 30, 2023
lukio added a commit to lukio/SuiteCRM-Core that referenced this issue Feb 9, 2023
…istener

Remove class RouteMatcherInterface type property
at CSRFCookieListener.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Environment Issues & PRs related to the application environment Priority:Important Issues & PRs that are important; broken functions; errors; there are workarounds Status: Fix Proposed A issue that has a PR related to it that provides a possible resolution Type:Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants