phpcr / phpcr-shell

PHPCR Shell
MIT License
68 stars 19 forks source link

Allow installation with symfony 6, drop PHP 7.4 support and test against PHP 8.1 #210

Closed alexander-schranz closed 2 years ago

alexander-schranz commented 2 years ago

Thix will add support for Symfony 6. For this It was required to drop PHP 7.4 support and lower, because of :static return type.

Requires:

alexander-schranz commented 2 years ago

@dantleech do you have maybe any hint here? I tried to get the test running locally without any success. Tested now the master branch, there the CI seems also to fail: https://github.com/phpcr/phpcr-shell/pull/211. Not sure what does cause this error.

alexander-schranz commented 2 years ago

Seems like it has todo with jackrabbit: https://github.com/phpcr/phpcr-shell/pull/212. I will try to update jackrabbit in jackalope jackrabbit repository:

dantleech commented 2 years ago

cool, merged that other one

alexander-schranz commented 2 years ago

@dantleech Thank you! looks like we need a release tag that the new version of jackalope jackrabbit is used here.

alexander-schranz commented 2 years ago

I did fix some PHP 8.1 issues in related packages:

But I still got some strange error:

  Scenario: Export a subtree                                                    # features/all/phpcr_session_export.feature:18
    Given I execute the "session:export /tests_general_base foobar.xml" command # PHPCR\Shell\Test\EmbeddedContext::iExecuteTheCommand()
    Then the file "foobar.xml" should exist                                     # PHPCR\Shell\Test\EmbeddedContext::theFileShouldExist()
    And the command should not fail                                             # PHPCR\Shell\Test\EmbeddedContext::theCommandShouldNotFail()
      Command failed: (1) [PHPCR\RepositoryException] Unknown encoding of binary data: text/xml; charset=UTF-8
       (Exception)

Sadly I'm not sure how to fix this. Any hint here /cc @dbu @dantleech

Locally I'm also not able to run all tests as it just stucks at:

Feature: Checkout a version
    In order to modify a versionable node
    As a user logged into the shell
    I must be able to execute a command which checksout the node

Not sure why.

dantleech commented 2 years ago

maybe see what's blocking it? is it stuck connecting to Jackrabbit? or waiting for user input or ... ?

alexander-schranz commented 2 years ago

@dantleech seems to wait for server to response, after a very long time it ends with:

so after the following test:

Feature: Checkout a version
    In order to modify a versionable node
    As a user logged into the shell
    I must be able to execute a command which checksout the node

It takes a lot of time and errors with:

┌─ @BeforeScenario # PHPCR\Shell\Test\EmbeddedContext::beforeScenario()
  │
  ╳  Unexpected error:
  ╳  CURL Error: Connection timeout after 300000 ms
  ╳  Response (HTTP 0): PROPFIND
  ╳  --uri: --
  ╳  array (
  ╳    0 => 'http://localhost:8080/server/default',
  ╳  )

but seems like its only a problem on my local system the CI seems to run fine, beside the text utf8 error.

dantleech commented 2 years ago

curl http://localhost:8080/server/default is the server running locally?

alexander-schranz commented 2 years ago

@dantleech yeah jackrabbit works else. the other tests which also require jackrabbit are running. it just when it comes to the Feature: Checkout a version it is stuck, but maybe its just an issue with the jackrabbit and arm cpu. Do you have any hint to the other error which is happening:

      Command failed: (1) [PHPCR\RepositoryException] Unknown encoding of binary data: text/xml; charset=UTF-8
       (Exception)
dantleech commented 2 years ago

no idea i would search for the thing that emits that error and go from there

alexander-schranz commented 2 years ago

Found it the error was in jackrabbit. The returned content type was UTF-8 not as expected utf-8 fixed it there: https://github.com/jackalope/jackalope-jackrabbit/pull/170