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

PHP Deprecated: trim(): ... no pipeline to run! #21

Open
billyromano opened this issue Jul 14, 2022 · 7 comments
Open

PHP Deprecated: trim(): ... no pipeline to run! #21

billyromano opened this issue Jul 14, 2022 · 7 comments
Assignees
Labels
accessibility easy access and use of pipeline features bug feedback-appreciated curious for feedback and/or responses of open questions module: yaml platform: macos reported against a non-linux system

Comments

@billyromano
Copy link

Just installed pipelines today and I'm brand new to this util. I've installed it using phive on macOS and setup my pipelines executable globally. I do have a bitbucket-pipelines.yml file setup and configured correctly. When just running the pipelines command with no additional flags in the same folder as the yaml file, it fails showing this error:

PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49
PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49
PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49
PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49
PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49
PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49
PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49
PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49
PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49
PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49
PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49
PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49
PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49
PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/user/.phive/phars/pipelines/vendor/ktomk/symfony-yaml/Inline.php on line 49
pipelines: no pipeline to run!

🙋🏻‍♂️How do I fix this deprecation issue?

PHP Info

php --version
PHP 8.1.8 (cli) (built: Jul  8 2022 12:51:36) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.8, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.8, Copyright (c), by Zend Technologies
@ktomk ktomk added bug feedback-appreciated curious for feedback and/or responses of open questions accessibility easy access and use of pipeline features platform: macos reported against a non-linux system module: yaml labels Jul 17, 2022
@ktomk ktomk self-assigned this Jul 17, 2022
@ktomk
Copy link
Owner

ktomk commented Jul 17, 2022

hello, and thanks for reporting this! @billyromano

the deprecation warning was caused by a regression in april this year and next version 0.0.67 will have it fixed.

to address the

pipelines: no pipeline to run!

message, please provide your bitbucket-pipelines.yml file in question, link to a gist is fine, if possible. the pipelines utility has some edge cases parsing the yaml file and I suspect this is the case here so that the default pipeline is not found. having the file would help to clarify on that (often there is an easy work-around).

@ktomk
Copy link
Owner

ktomk commented Jul 17, 2022

version 0.0.67 has been released. you can update it already with phive (e.g. phive update pipelines).

that should remove the deprecation messages. the yaml file would still help me to add a regression test so that I don't tap into mistakes as the one that happened.

I leave this issue open as I'm pretty sure that the

pipelines: no pipeline to run!

message still is the case with 0.0.67 and the bitbucket-pipelines.yml file.

@billyromano
Copy link
Author

billyromano commented Jul 19, 2022

I just updated to 0.0.67 and here's the new issues showing up:

PHP Deprecated:  Return type of Ktomk\Pipelines\Value\Env\EnvFile::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/user/.phive/phars/pipelines/src/Value/Env/EnvFile.php on line 54

Deprecated: Return type of Ktomk\Pipelines\Value\Env\EnvFile::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/user/.phive/phars/pipelines/src/Value/Env/EnvFile.php on line 54
PHP Deprecated:  Return type of Ktomk\Pipelines\Value\Env\EnvFile::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/user/.phive/phars/pipelines/src/Value/Env/EnvFile.php on line 49

Deprecated: Return type of Ktomk\Pipelines\Value\Env\EnvFile::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/user/.phive/phars/pipelines/src/Value/Env/EnvFile.php on line 49
pipelines: no pipeline to run!

Here's my bitbucket-pipelines.yml file for your reference:

pipelines:
    branches:
        develop:
            -
                step:
                    name:       Deploy Node.js App to Azure
                    deployment: staging
                    script:
                        -
                            pipe: microsoft/azure-static-web-apps-deploy:main
                            variables:
                                REQUIRED_OS_PACKAGES: nasm
                                APP_LOCATION:         '$BITBUCKET_CLONE_DIR'
#                                API_LOCATION:         '$BITBUCKET_CLONE_DIR/src/pages/api'
                                OUTPUT_LOCATION:      '$BITBUCKET_CLONE_DIR/out'
                                APP_BUILD_COMMAND:    'yarn build:staging'
                                API_TOKEN:            $deployment_token

@ktomk
Copy link
Owner

ktomk commented Jul 20, 2022

I'll address that one as well with the next release. It is not the cause of the message thought.

Your bitbucket-pipelines.yml file has no default pipeline which would be run. see --pipeline and/or --trigger.

However mind that pipe is not fully implemented.

@billyromano
Copy link
Author

Ok that makes sense now 🙂

I'll make sure to update and use default instead of branches for my testing.

When do you think the pipe structure will be implemented? This is the main thing I need to test for my setup. I'm trying to figure out why Bitbucket running this pipeline doesn't show images in Azure, but running this pipeline locally through Docker the images show up fine. I think it's an image file permissions issue, but I'm not sure yet.

@duffar
Copy link

duffar commented Sep 8, 2022

I see lots of similar errors as @billyromano - even when issuing a simple $ pipelines --version command. I'm using PHP 8.1.9:

PHP 8.1.9 (cli) (built: Aug  4 2022 15:11:08) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.9, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.9, Copyright (c), by Zend Technologies
$ pipelines --version
PHP Deprecated:  Return type of Ktomk\Pipelines\Cli\Args\OptionFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jeffryan/.composer/vendor/ktomk/pipelines/src/Cli/Args/OptionFilterIterator.php on line 67

Deprecated: Return type of Ktomk\Pipelines\Cli\Args\OptionFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jeffryan/.composer/vendor/ktomk/pipelines/src/Cli/Args/OptionFilterIterator.php on line 67
PHP Deprecated:  Return type of Ktomk\Pipelines\Cli\Args\OptionIterator::rewind() should either be compatible with IteratorIterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jeffryan/.composer/vendor/ktomk/pipelines/src/Cli/Args/OptionIterator.php on line 106

Deprecated: Return type of Ktomk\Pipelines\Cli\Args\OptionIterator::rewind() should either be compatible with IteratorIterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jeffryan/.composer/vendor/ktomk/pipelines/src/Cli/Args/OptionIterator.php on line 106
PHP Deprecated:  Return type of Ktomk\Pipelines\Cli\Args\OptionIterator::valid() should either be compatible with IteratorIterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jeffryan/.composer/vendor/ktomk/pipelines/src/Cli/Args/OptionIterator.php on line 92
...

I updated to the latest 0.0.67 version but am getting the same issue. Things worked fine earlier so I am wondering if I updated a dependency... like php

@ktomk
Copy link
Owner

ktomk commented Sep 13, 2022

@duffar: Yes, that are deprecation warnings from PHP 8.1. Can you share which operating system / distro you're using? And thanks for reporting. Next version should have less noise if not getting completely rid of the warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility easy access and use of pipeline features bug feedback-appreciated curious for feedback and/or responses of open questions module: yaml platform: macos reported against a non-linux system
Projects
None yet
Development

No branches or pull requests

3 participants