问:
testing PayPal IPN using beyondcode/expose to use a designated port - how to
I am using docker, and attempting to

```<code>sail share
</code>```

so i can get a tunnel to my local computer to test PayPal IPN.  When i Share to get that tunnel i get

```<code>sail share
Thank you for using expose.
Local-URL:      host.docker.internal:80
Dashboard-URL:      http://127.0.0.1:4040
Expose-URL:     http://eavglxsmrk.laravel-sail.site:8080
</code>```

When I point PayPal's ipn message to the exposed-url, it does not work because IPN will only send messages to the convential internet ports 80 or 443.

So I purchased the Expose Pro package so I could create a subdomain with no port, so I guees it would use port 80.  But when I try to run the expose to the domain that has not port designated I get a whopping mouthfull of Deprecateed error.  here is a small sample (actually they will be at the end.

I tried running expose both inside the docker / sail shell, and out side of it.    Sail Share still works, but it produces the :8080 port reference, which IPN does not like.

If I try

```<code>sail expose token [token goes here]
</code>```

I get a less ominous error page.

```<code>No such command: expose

Commands:
  build              Build or rebuild services
  config             Validate and view the Compose file
  create             Create services
  down               Stop and remove resources
  events             Receive real time events from containers
  exec               Execute a command in a running container
  help               Get help on a command
  images             List images
  kill               Kill containers
  logs               View output from containers
  pause              Pause services
  port               Print the public port for a port binding
  ps                 List containers
  pull               Pull service images
  push               Push service images
  restart            Restart services
  rm                 Remove stopped containers
  run                Run a one-off command
  scale              Set number of containers for a service
  start              Start services
  stop               Stop services
  top                Display the running processes
  unpause            Unpause services
  up                 Create and start containers
  version            Show version information and quit

Docker Compose is now in the Docker CLI, try `docker compose`

</code>```

My objective is to get rid of the port reference so IPN can send its message to my local computer.

any hints out there?

Thank you.

below is a sample of the errors I get when I try to run expose in the Mac environment, outside the docker shell.  this is the version i have of php running in the Mac OS:

```<code> php --version
PHP 8.1.2 (cli) (built: Jan 21 2022 04:47:46) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2, Copyright (c), by Zend Technologies
</code>```

This is the version of php i have withing the docker shell:

```<code>sail php --version
PHP 8.0.2 (cli) (built: Feb 23 2021 15:14:20) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.2, Copyright (c), by Zend Technologies
    with Xdebug v3.1.3, Copyright (c) 2002-2022, by Derick Rethans
</code>```

and below is a sample of the long deprecated warning i get when i try to expose my token in the mac os, outside of the docker shell.  It looks like the expose outside is conflicting with the expose that is inside the docker shell:

```PHP Deprecated:  Return type of HumbugBox3122\KevinGH\RequirementChecker\RequirementCollection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/.box/src/RequirementCollection.php on line 12

Deprecated: Return type of HumbugBox3122\KevinGH\RequirementChecker\RequirementCollection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/.box/src/RequirementCollection.php on line 12
PHP Deprecated:  Return type of HumbugBox3122\KevinGH\RequirementChecker\RequirementCollection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/.box/src/RequirementCollection.php on line 16

Deprecated: Return type of HumbugBox3122\KevinGH\RequirementChecker\RequirementCollection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/.box/src/RequirementCollection.php on line 16
PHP Deprecated:  getopt(): Passing null to parameter #1 ($short_options) of type string is deprecated in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/expose on line 22

Deprecated: getopt(): Passing null to parameter #1 ($short_options) of type string is deprecated in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/expose on line 22
PHP Deprecated:  Return type of Illuminate\Container\Container::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/container/Container.php on line 1355

Deprecated: Return type of Illuminate\Container\Container::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/container/Container.php on line 1355
PHP Deprecated:  Return type of Illuminate\Container\Container::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/container/Container.php on line 1366

Deprecated: Return type of Illuminate\Container\Container::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/container/Container.php on line 1366
PHP Deprecated:  Return type of Illuminate\Container\Container::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/container/Container.php on line 1378

Deprecated: Return type of Illuminate\Container\Container::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/container/Container.php on line 1378
PHP Deprecated:  Return type of Illuminate\Container\Container::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/container/Container.php on line 1391

Deprecated: Return type of Illuminate\Container\Container::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/container/Container.php on line 1391
PHP Deprecated:  Return type of PhpOption\Some::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/phpoption/phpoption/src/PhpOption/Some.php on line 152

Deprecated: Return type of PhpOption\Some::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/phpoption/phpoption/src/PhpOption/Some.php on line 152
PHP Deprecated:  Return type of PhpOption\None::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/phpoption/phpoption/src/PhpOption/None.php on line 118

Deprecated: Return type of PhpOption\None::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/phpoption/phpoption/src/PhpOption/None.php on line 118
PHP Deprecated:  Return type of Illuminate\Config\Repository::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/config/Repository.php on line 141

Deprecated: Return type of Illuminate\Config\Repository::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/config/Repository.php on line 141
PHP Deprecated:  Return type of Illuminate\Config\Repository::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/config/Repository.php on line 152

Deprecated: Return type of Illuminate\Config\Repository::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/config/Repository.php on line 152
PHP Deprecated:  Return type of Illuminate\Config\Repository::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/config/Repository.php on line 164

Deprecated: Return type of Illuminate\Config\Repository::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/config/Repository.php on line 164
PHP Deprecated:  Return type of Illuminate\Config\Repository::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/config/Repository.php on line 175

Deprecated: Return type of Illuminate\Config\Repository::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/config/Repository.php on line 175
PHP Deprecated:  Return type of Symfony\Component\Finder\Finder::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Finder.php on line 608

Deprecated: Return type of Symfony\Component\Finder\Finder::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Finder.php on line 608
PHP Deprecated:  Return type of Symfony\Component\Finder\Finder::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Finder.php on line 690

Deprecated: Return type of Symfony\Component\Finder\Finder::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Finder.php on line 690
PHP Deprecated:  Return type of Symfony\Component\Finder\Iterator\FileTypeFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php on line 42

Deprecated: Return type of Symfony\Component\Finder\Iterator\FileTypeFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php on line 42
PHP Deprecated:  Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::getChildren() should either be compatible with RecursiveDirectoryIterator::getChildren(): RecursiveDirectoryIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php on line 85

Deprecated: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::getChildren() should either be compatible with RecursiveDirectoryIterator::getChildren(): RecursiveDirectoryIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php on line 85
PHP Deprecated:  Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::rewind() should either be compatible with FilesystemIterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php on line 113

Deprecated: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::rewind() should either be compatible with FilesystemIterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php on line 113
PHP Deprecated:  Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::current() should either be compatible with FilesystemIterator::current(): SplFileInfo|FilesystemIterator|string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php on line 61

Deprecated: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::current() should either be compatible with FilesystemIterator::current(): SplFileInfo|FilesystemIterator|string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php on line 61
PHP Deprecated:  Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php on line 55

Deprecated: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php on line 55
PHP Deprecated:  Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::hasChildren() should either be compatible with RecursiveIterator::hasChildren(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php on line 74

Deprecated: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::hasChildren() should either be compatible with RecursiveIterator::hasChildren(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php on line 74
PHP Deprecated:  Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::getChildren() should either be compatible with RecursiveIterator::getChildren(): ?RecursiveIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php on line 79

Deprecated: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::getChildren() should either be compatible with RecursiveIterator::getChildren(): ?RecursiveIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php on line 79
PHP Deprecated:  Return type of Symfony\Component\Finder\Iterator\FilenameFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/FilenameFilterIterator.php on line 28

Deprecated: Return type of Symfony\Component\Finder\Iterator\FilenameFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/FilenameFilterIterator.php on line 28
PHP Deprecated:  Return type of Symfony\Component\Finder\Iterator\PathFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/PathFilterIterator.php on line 27

Deprecated: Return type of Symfony\Component\Finder\Iterator\PathFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/PathFilterIterator.php on line 27
PHP Fatal error:  During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/collections/Collection.php:1443
Stack trace:
#0 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/collections/Collection.php(13): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8192, 'Return type of ...', 'phar:///Users/r...', 1443)
#1 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/.box/vendor/composer/ClassLoader.php(478): include('phar:///Users/r...')
#2 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/.box/vendor/composer/ClassLoader.php(346): Composer\Autoload\includeFile('phar:///Users/r...')
#3 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/collections/helpers.php(15): Composer\Autoload\ClassLoader->loadClass('Illuminate\\Supp...')
#4 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/foundation/src/Illuminate/Foundation/PackageManifest.php(89): collect(Array)
#5 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/foundation/src/Illuminate/Foundation/PackageManifest.php(78): Illuminate\Foundation\PackageManifest->config('aliases')
#6 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/foundation/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php(26): Illuminate\Foundation\PackageManifest->aliases()
#7 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/framework/src/Bootstrap/RegisterFacades.php(71): Illuminate\Foundation\Bootstrap\RegisterFacades->bootstrap(Object(LaravelZero\Framework\Application))
#8 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/foundation/src/Illuminate/Foundation/Application.php(243): LaravelZero\Framework\Bootstrap\RegisterFacades->bootstrap(Object(LaravelZero\Framework\Application))
#9 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/foundation/src/Illuminate/Foundation/Console/Kernel.php(310): Illuminate\Foundation\Application->bootstrapWith(Array)
#10 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/framework/src/Kernel.php(130): Illuminate\Foundation\Console\Kernel->bootstrap()
#11 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/framework/src/Kernel.php(102): LaravelZero\Framework\Kernel->bootstrap()
#12 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/framework/src/Kernel.php(89): LaravelZero\Framework\Kernel->ensureDefaultCommand(Object(Symfony\Component\Console\Input\ArgvInput))
#13 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/expose(46): LaravelZero\Framework\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose(14): require('phar:///Users/r...')
#15 {main} in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/collections/Collection.php on line 13
PHP Fatal error:  Uncaught Symfony\Component\ErrorHandler\Error\FatalError: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/collections/Collection.php:1443
Stack trace:
#0 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/collections/Collection.php(13): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8192, 'Return type of ...', 'phar:///Users/r...', 1443)
#1 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/.box/vendor/composer/ClassLoader.php(478): include('phar:///Users/r...')
#2 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/.box/vendor/composer/ClassLoader.php(346): Composer\Autoload\includeFile('phar:///Users/r...')
#3 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/collections/helpers.php(15): Composer\Autoload\ClassLoader->loadClass('Illuminate\\Supp...')
#4 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/foundation/src/Illuminate/Foundation/PackageManifest.php(89): collect(Array)
#5 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/foundation/src/Illuminate/Foundation/PackageManifest.php(78): Illuminate\Foundation\PackageManifest->config('aliases')
#6 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/foundation/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php(26): Illuminate\Foundation\PackageManifest->aliases()
#7 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/framework/src/Bootstrap/RegisterFacades.php(71): Illuminate\Foundation\Bootstrap\RegisterFacades->bootstrap(Object(LaravelZero\Framework\Application))
#8 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/foundation/src/Illuminate/Foundation/Application.php(243): LaravelZero\Framework\Bootstrap\RegisterFacades->bootstrap(Object(LaravelZero\Framework\Application))
#9 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/foundation/src/Illuminate/Foundation/Console/Kernel.php(310): Illuminate\Foundation\Application->bootstrapWith(Array)
#10 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/framework/src/Kernel.php(130): Illuminate\Foundation\Console\Kernel->bootstrap()
#11 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/framework/src/Kernel.php(102): LaravelZero\Framework\Kernel->bootstrap()
#12 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/framework/src/Kernel.php(89): LaravelZero\Framework\Kernel->ensureDefaultCommand(Object(Symfony\Component\Console\Input\ArgvInput))

```

答:
well, it turns out that Sail uses a dedicated network with expose, so you cannot use the Expose Pro within a Sail/Docker container.  Additionally, Expose needed to issue an update in order for it to work with php 8.1.  They issued the update today.  And Now I am able to expose my local host to a chosen domain name at sharedwithexpose.com.  And, Expose exposes a secure port 443 so Paypal will be able to  communicate with it.

So consider this issue closed i suppose.

Body:
I am using docker, and attempting to

sail share

so i can get a tunnel to my local computer to test PayPal IPN.  When i Share to get that tunnel i get

sail share
Thank you for using expose.
Local-URL:      host.docker.internal:80
Dashboard-URL:      http://127.0.0.1:4040
Expose-URL:     http://eavglxsmrk.laravel-sail.site:8080

When I point PayPal's ipn message to the exposed-url, it does not work because IPN will only send messages to the convential internet ports 80 or 443.

So I purchased the Expose Pro package so I could create a subdomain with no port, so I guees it would use port 80.  But when I try to run the expose to the domain that has not port designated I get a whopping mouthfull of Deprecateed error.  here is a small sample (actually they will be at the end.

I tried running expose both inside the docker / sail shell, and out side of it.    Sail Share still works, but it produces the :8080 port reference, which IPN does not like.

If I try

sail expose token [token goes here]

I get a less ominous error page.

No such command: expose

Commands:
  build              Build or rebuild services
  config             Validate and view the Compose file
  create             Create services
  down               Stop and remove resources
  events             Receive real time events from containers
  exec               Execute a command in a running container
  help               Get help on a command
  images             List images
  kill               Kill containers
  logs               View output from containers
  pause              Pause services
  port               Print the public port for a port binding
  ps                 List containers
  pull               Pull service images
  push               Push service images
  restart            Restart services
  rm                 Remove stopped containers
  run                Run a one-off command
  scale              Set number of containers for a service
  start              Start services
  stop               Stop services
  top                Display the running processes
  unpause            Unpause services
  up                 Create and start containers
  version            Show version information and quit

Docker Compose is now in the Docker CLI, try `docker compose`

My objective is to get rid of the port reference so IPN can send its message to my local computer.

any hints out there?

Thank you.

below is a sample of the errors I get when I try to run expose in the Mac environment, outside the docker shell.  this is the version i have of php running in the Mac OS:

 php --version
PHP 8.1.2 (cli) (built: Jan 21 2022 04:47:46) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2, Copyright (c), by Zend Technologies

This is the version of php i have withing the docker shell:

sail php --version
PHP 8.0.2 (cli) (built: Feb 23 2021 15:14:20) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.2, Copyright (c), by Zend Technologies
    with Xdebug v3.1.3, Copyright (c) 2002-2022, by Derick Rethans

and below is a sample of the long deprecated warning i get when i try to expose my token in the mac os, outside of the docker shell.  It looks like the expose outside is conflicting with the expose that is inside the docker shell:

PHP Deprecated:  Return type of HumbugBox3122\KevinGH\RequirementChecker\RequirementCollection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/.box/src/RequirementCollection.php on line 12

Deprecated: Return type of HumbugBox3122\KevinGH\RequirementChecker\RequirementCollection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/.box/src/RequirementCollection.php on line 12
PHP Deprecated:  Return type of HumbugBox3122\KevinGH\RequirementChecker\RequirementCollection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/.box/src/RequirementCollection.php on line 16

Deprecated: Return type of HumbugBox3122\KevinGH\RequirementChecker\RequirementCollection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/.box/src/RequirementCollection.php on line 16
PHP Deprecated:  getopt(): Passing null to parameter #1 ($short_options) of type string is deprecated in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/expose on line 22

Deprecated: getopt(): Passing null to parameter #1 ($short_options) of type string is deprecated in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/expose on line 22
PHP Deprecated:  Return type of Illuminate\Container\Container::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/container/Container.php on line 1355

Deprecated: Return type of Illuminate\Container\Container::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/container/Container.php on line 1355
PHP Deprecated:  Return type of Illuminate\Container\Container::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/container/Container.php on line 1366

Deprecated: Return type of Illuminate\Container\Container::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/container/Container.php on line 1366
PHP Deprecated:  Return type of Illuminate\Container\Container::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/container/Container.php on line 1378

Deprecated: Return type of Illuminate\Container\Container::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/container/Container.php on line 1378
PHP Deprecated:  Return type of Illuminate\Container\Container::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/container/Container.php on line 1391

Deprecated: Return type of Illuminate\Container\Container::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/container/Container.php on line 1391
PHP Deprecated:  Return type of PhpOption\Some::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/phpoption/phpoption/src/PhpOption/Some.php on line 152

Deprecated: Return type of PhpOption\Some::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/phpoption/phpoption/src/PhpOption/Some.php on line 152
PHP Deprecated:  Return type of PhpOption\None::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/phpoption/phpoption/src/PhpOption/None.php on line 118

Deprecated: Return type of PhpOption\None::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/phpoption/phpoption/src/PhpOption/None.php on line 118
PHP Deprecated:  Return type of Illuminate\Config\Repository::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/config/Repository.php on line 141

Deprecated: Return type of Illuminate\Config\Repository::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/config/Repository.php on line 141
PHP Deprecated:  Return type of Illuminate\Config\Repository::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/config/Repository.php on line 152

Deprecated: Return type of Illuminate\Config\Repository::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/config/Repository.php on line 152
PHP Deprecated:  Return type of Illuminate\Config\Repository::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/config/Repository.php on line 164

Deprecated: Return type of Illuminate\Config\Repository::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/config/Repository.php on line 164
PHP Deprecated:  Return type of Illuminate\Config\Repository::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/config/Repository.php on line 175

Deprecated: Return type of Illuminate\Config\Repository::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/config/Repository.php on line 175
PHP Deprecated:  Return type of Symfony\Component\Finder\Finder::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Finder.php on line 608

Deprecated: Return type of Symfony\Component\Finder\Finder::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Finder.php on line 608
PHP Deprecated:  Return type of Symfony\Component\Finder\Finder::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Finder.php on line 690

Deprecated: Return type of Symfony\Component\Finder\Finder::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Finder.php on line 690
PHP Deprecated:  Return type of Symfony\Component\Finder\Iterator\FileTypeFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php on line 42

Deprecated: Return type of Symfony\Component\Finder\Iterator\FileTypeFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php on line 42
PHP Deprecated:  Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::getChildren() should either be compatible with RecursiveDirectoryIterator::getChildren(): RecursiveDirectoryIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php on line 85

Deprecated: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::getChildren() should either be compatible with RecursiveDirectoryIterator::getChildren(): RecursiveDirectoryIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php on line 85
PHP Deprecated:  Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::rewind() should either be compatible with FilesystemIterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php on line 113

Deprecated: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::rewind() should either be compatible with FilesystemIterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php on line 113
PHP Deprecated:  Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::current() should either be compatible with FilesystemIterator::current(): SplFileInfo|FilesystemIterator|string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php on line 61

Deprecated: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::current() should either be compatible with FilesystemIterator::current(): SplFileInfo|FilesystemIterator|string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php on line 61
PHP Deprecated:  Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php on line 55

Deprecated: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php on line 55
PHP Deprecated:  Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::hasChildren() should either be compatible with RecursiveIterator::hasChildren(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php on line 74

Deprecated: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::hasChildren() should either be compatible with RecursiveIterator::hasChildren(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php on line 74
PHP Deprecated:  Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::getChildren() should either be compatible with RecursiveIterator::getChildren(): ?RecursiveIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php on line 79

Deprecated: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::getChildren() should either be compatible with RecursiveIterator::getChildren(): ?RecursiveIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php on line 79
PHP Deprecated:  Return type of Symfony\Component\Finder\Iterator\FilenameFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/FilenameFilterIterator.php on line 28

Deprecated: Return type of Symfony\Component\Finder\Iterator\FilenameFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/FilenameFilterIterator.php on line 28
PHP Deprecated:  Return type of Symfony\Component\Finder\Iterator\PathFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/PathFilterIterator.php on line 27

Deprecated: Return type of Symfony\Component\Finder\Iterator\PathFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Iterator/PathFilterIterator.php on line 27
PHP Fatal error:  During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/collections/Collection.php:1443
Stack trace:
#0 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/collections/Collection.php(13): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8192, 'Return type of ...', 'phar:///Users/r...', 1443)
#1 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/.box/vendor/composer/ClassLoader.php(478): include('phar:///Users/r...')
#2 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/.box/vendor/composer/ClassLoader.php(346): Composer\Autoload\includeFile('phar:///Users/r...')
#3 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/collections/helpers.php(15): Composer\Autoload\ClassLoader->loadClass('Illuminate\\Supp...')
#4 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/foundation/src/Illuminate/Foundation/PackageManifest.php(89): collect(Array)
#5 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/foundation/src/Illuminate/Foundation/PackageManifest.php(78): Illuminate\Foundation\PackageManifest->config('aliases')
#6 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/foundation/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php(26): Illuminate\Foundation\PackageManifest->aliases()
#7 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/framework/src/Bootstrap/RegisterFacades.php(71): Illuminate\Foundation\Bootstrap\RegisterFacades->bootstrap(Object(LaravelZero\Framework\Application))
#8 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/foundation/src/Illuminate/Foundation/Application.php(243): LaravelZero\Framework\Bootstrap\RegisterFacades->bootstrap(Object(LaravelZero\Framework\Application))
#9 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/foundation/src/Illuminate/Foundation/Console/Kernel.php(310): Illuminate\Foundation\Application->bootstrapWith(Array)
#10 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/framework/src/Kernel.php(130): Illuminate\Foundation\Console\Kernel->bootstrap()
#11 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/framework/src/Kernel.php(102): LaravelZero\Framework\Kernel->bootstrap()
#12 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/framework/src/Kernel.php(89): LaravelZero\Framework\Kernel->ensureDefaultCommand(Object(Symfony\Component\Console\Input\ArgvInput))
#13 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/expose(46): LaravelZero\Framework\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose(14): require('phar:///Users/r...')
#15 {main} in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/collections/Collection.php on line 13
PHP Fatal error:  Uncaught Symfony\Component\ErrorHandler\Error\FatalError: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/collections/Collection.php:1443
Stack trace:
#0 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/collections/Collection.php(13): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8192, 'Return type of ...', 'phar:///Users/r...', 1443)
#1 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/.box/vendor/composer/ClassLoader.php(478): include('phar:///Users/r...')
#2 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/.box/vendor/composer/ClassLoader.php(346): Composer\Autoload\includeFile('phar:///Users/r...')
#3 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/illuminate/collections/helpers.php(15): Composer\Autoload\ClassLoader->loadClass('Illuminate\\Supp...')
#4 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/foundation/src/Illuminate/Foundation/PackageManifest.php(89): collect(Array)
#5 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/foundation/src/Illuminate/Foundation/PackageManifest.php(78): Illuminate\Foundation\PackageManifest->config('aliases')
#6 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/foundation/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php(26): Illuminate\Foundation\PackageManifest->aliases()
#7 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/framework/src/Bootstrap/RegisterFacades.php(71): Illuminate\Foundation\Bootstrap\RegisterFacades->bootstrap(Object(LaravelZero\Framework\Application))
#8 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/foundation/src/Illuminate/Foundation/Application.php(243): LaravelZero\Framework\Bootstrap\RegisterFacades->bootstrap(Object(LaravelZero\Framework\Application))
#9 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/foundation/src/Illuminate/Foundation/Console/Kernel.php(310): Illuminate\Foundation\Application->bootstrapWith(Array)
#10 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/framework/src/Kernel.php(130): Illuminate\Foundation\Console\Kernel->bootstrap()
#11 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/framework/src/Kernel.php(102): LaravelZero\Framework\Kernel->bootstrap()
#12 phar:///Users/robertbryandavis/.composer/vendor/beyondcode/expose/builds/expose/vendor/laravel-zero/framework/src/Kernel.php(89): LaravelZero\Framework\Kernel->ensureDefaultCommand(Object(Symfony\Component\Console\Input\ArgvInput))


来源: stackexchange

问:
Inter-column padding in Bootstrap 4 without side margins
I'm using Bootstrap 4.1. I'd like to have a grid of cells (Box A-E) with some spacing in between them. If I set padding on each column, I also get padding on the left and right side that breaks alignment with other elements; I would like Box A and Box D to align with the left edge of Top Box, for example.

The documentation talks about using a negative margin to offset this but I couldn't figure out where to put it.

The set of boxes is dynamic (there could be dozens) and I'd like to apply consistent styling to all of them, rather than make modifications to specific boxes.

I also want to avoid making modifications to Top Box, which is a stand-in for many existing UI elements in my real page that cannot easily be changed.

Here's a JSFiddle:
https://jsfiddle.net/u5094cjb/2/

body {
  margin: 1rem;
}

.box {
  border: 1px solid black;
  background-color: white;
  margin-bottom: 0.1rem;
}```
<pre class="snippet-code-html lang-html prettyprint-override"><code><head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
</head>

<div class="container">

  <!-- ideally don't change this part -->
  <div class="row">
    <div class="col">
      <div class="box">Top Box</div>
    </div>
  </div>

  <!-- change this part only -->
  <div class="row">
    <div class="col">
      <div class="container">
        <div class="row">
          <div class="col-4 px-1">
            <div class="box">Box A</div>
          </div>
          <div class="col-4 px-1">
            <div class="box">Box B</div>
          </div>
          <div class="col-4 px-1">
            <div class="box">Box C</div>
          </div>
          <div class="col-4 px-1">
            <div class="box">Box D</div>
          </div>
          <div class="col-4 px-1">
            <div class="box">Box E</div>
          </div>
        </div>
      </div>
    </div>
  </div>

</div></code>```

答:
Use the Bootstrap classes pr-1 & pl-0 instead of px-1 to Box A and Box D

For example,

Box B

Box C

Box D

Box E

```

Fiddle: https://jsfiddle.net/kongallis/cebqw7y8/2/

ContentLicense: CC BY-SA 4.0

Body:
I'm using Bootstrap 4.1. I'd like to have a grid of cells (Box A-E) with some spacing in between them. If I set padding on each column, I also get padding on the left and right side that breaks alignment with other elements; I would like Box A and Box D to align with the left edge of Top Box, for example.

The documentation talks about using a negative margin to offset this but I couldn't figure out where to put it.

The set of boxes is dynamic (there could be dozens) and I'd like to apply consistent styling to all of them, rather than make modifications to specific boxes.

I also want to avoid making modifications to Top Box, which is a stand-in for many existing UI elements in my real page that cannot easily be changed.

Here's a JSFiddle:
https://jsfiddle.net/u5094cjb/2/

body {
  margin: 1rem;
}

.box {
  border: 1px solid black;
  background-color: white;
  margin-bottom: 0.1rem;
}

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">

Top Box

Box A

Box B

Box C

Box D

Box E

Body:
Use the Bootstrap classes pr-1 & pl-0 instead of px-1 to Box A and Box D

For example,

<div class="col-4 px-1">
  <div class="box">Box B</div>
</div>
<div class="col-4 px-1">
  <div class="box">Box C</div>
</div>
<div class="col-4 pr-1 pl-0">
  <div class="box">Box D</div>
</div>
<div class="col-4 px-1">
  <div class="box">Box E</div>
</div>

Fiddle: https://jsfiddle.net/kongallis/cebqw7y8/2/


问:
Test Driven Development for ASP.NET MVC 3 - Parsing XML source file
Hi would like to reach out to the community to gain insight and advice
on the approach to Test-Driven Development for the work I'm carrying out.

I am working on a ASP.NET MVC3 project that parses in a physical XML file (containing chart and table data).
First the app generates a model representation of the xml nodes.
The controller is there to carriy out the application logic,

that ultimately renders to a specific HTML view with charts and tables.

I am thinking that I will be building a model that represents the xml ie classes like dataset,header,dimension etc with
appropriate interfaces. Is this the right approach. (Please see below the sample xml)

What sort of units tests would I write?
Would I start with unit tests that access the physical XML files (probably not)?
Should I stream fragmetns of xml strings into an Xdocument? (isn't that teting .net code?)
Presuming I don't want to create concrete XDocument classes, how do I mock out the object eg

First test I want to do (I think) is to load the xml and test the end_Date is correct

I have a XMLHelper Class that loads the xml and returns a class representation of a header with property end date.

So my concrete code would look something roughly like

```<code>var dataset = XmlHelper.Load(filePathOrXmlStream);
var header=dataset.Header;

Assert.AreEqual("5/06/2011",header.EndDate);
</code>```

presume that the below XML is used for the stream or file load.

XML Source

```<code><dataset>
  <header>
    <end_date>5/06/2011</end_date>
    <dimension id="mkt" desc="market">
      <item mkt="0" desc="Company A" />
      <item mkt="1" desc="Company B" />
    </dimension>
    <dimension id="prd" desc="product">
      <item prd="0" desc="Product A " Groups_Total="Segment Totals" Total="Yes" Product="All" grp="Category" />
    </dimension>
    <dimension id="msr" desc="measure">
      <item msr="0" tag="ACTIVE_1" desc="Active Products" />
    </dimension>
    <dimension id="tim" desc="time">
      <item tim="0" tag="LAST WEEK -52" desc="06/06/10 " />
      <item tim="1" tag="LAST WEEK -26" desc="05/12/10 " />
      <item tim="2" tag="LAST WEEK 0" desc="05/06/11 " />
    </dimension>
  </header>
  <data>
    <dpGroup tim="0">
      <dp mkt="0" prd="0" msr="0" tim="0">1031</dp>
      <dp mkt="1" prd="0" msr="0" tim="0">986</dp>
    </dpGroup>
    <dpGroup tim="1">
      <dp mkt="0" prd="0" msr="0" tim="1">970</dp>
      <dp mkt="1" prd="0" msr="0" tim="1">937</dp>
    </dpGroup>
    <dpGroup tim="2">
      <dp mkt="0" prd="0" msr="0" tim="2">982</dp>
      <dp mkt="1" prd="0" msr="0" tim="2">955</dp>
    </dpGroup>
  </data>
</dataset>
</code>```

答:
I would do the most important test first:

```<code> Given model representation of xml,
 when user asks html output,
 controller should produce correct view with chart/table.
</code>```

Making and passing that test will make you think about overall design too. After that, it will be branch & bound.

ContentLicense: CC BY-SA 3.0

Body:
Hi would like to reach out to the community to gain insight and advice
on the approach to Test-Driven Development for the work I'm carrying out.

I am working on a ASP.NET MVC3 project that parses in a physical XML file (containing chart and table data).
First the app generates a model representation of the xml nodes.
The controller is there to carriy out the application logic,

that ultimately renders to a specific HTML view with charts and tables.

I am thinking that I will be building a model that represents the xml ie classes like dataset,header,dimension etc with
appropriate interfaces. Is this the right approach. (Please see below the sample xml)

What sort of units tests would I write?
Would I start with unit tests that access the physical XML files (probably not)?
Should I stream fragmetns of xml strings into an Xdocument? (isn't that teting .net code?)
Presuming I don't want to create concrete XDocument classes, how do I mock out the object eg

First test I want to do (I think) is to load the xml and test the end_Date is correct

I have a XMLHelper Class that loads the xml and returns a class representation of a header with property end date.

So my concrete code would look something roughly like

var dataset = XmlHelper.Load(filePathOrXmlStream);
var header=dataset.Header;

Assert.AreEqual("5/06/2011",header.EndDate);

presume that the below XML is used for the stream or file load.

XML Source

<dataset>

    <end_date>5/06/2011</end_date>
    <dimension id="mkt" desc="market">
      <item mkt="0" desc="Company A" />
      <item mkt="1" desc="Company B" />
    </dimension>
    <dimension id="prd" desc="product">
      <item prd="0" desc="Product A " Groups_Total="Segment Totals" Total="Yes" Product="All" grp="Category" />
    </dimension>
    <dimension id="msr" desc="measure">
      <item msr="0" tag="ACTIVE_1" desc="Active Products" />
    </dimension>
    <dimension id="tim" desc="time">
      <item tim="0" tag="LAST WEEK -52" desc="06/06/10 " />
      <item tim="1" tag="LAST WEEK -26" desc="05/12/10 " />
      <item tim="2" tag="LAST WEEK 0" desc="05/06/11 " />
    </dimension>

  <data>
    <dpGroup tim="0">
      <dp mkt="0" prd="0" msr="0" tim="0">1031</dp>
      <dp mkt="1" prd="0" msr="0" tim="0">986</dp>
    </dpGroup>
    <dpGroup tim="1">
      <dp mkt="0" prd="0" msr="0" tim="1">970</dp>
      <dp mkt="1" prd="0" msr="0" tim="1">937</dp>
    </dpGroup>
    <dpGroup tim="2">
      <dp mkt="0" prd="0" msr="0" tim="2">982</dp>
      <dp mkt="1" prd="0" msr="0" tim="2">955</dp>
    </dpGroup>
  </data>
</dataset>

Body:
I would do the most important test first:

 Given model representation of xml,
 when user asks html output,
 controller should produce correct view with chart/table.

Making and passing that test will make you think about overall design too. After that, it will be branch & bound.


问:
Getting two different outputs in two different apps?
When I run the code in replit I get the following output 1024, 512,0,0,0 but when I run it in VS Code I get 2,2,0,0,0. Is there something wrong with my VS Code C++ configuration.</p>
```<code>#include <iostream>
#include <cctype>

using namespace std;
int main(){
string my_string;
cout << "Enter a string: " ;
getline(cin,my_string);
cout << isalpha(my_string[0]) << endl;
cout << islower(my_string[0]) << endl;
cout << isupper(my_string[0]) << endl;
cout << isdigit(my_string[0]) << endl;
cout << isspace(my_string[0]) << endl;
return 0;
}
</code>```

答:
When those functions return a positive value, it can be any positive value. There are no guarantees about it being a particular positive value, nor that the value will always be the same positive value.

Is there something wrong with my VS Code C++ configuration.

No; this is normal.

Body:
When I run the code in replit I get the following output 1024, 512,0,0,0 but when I run it in VS Code I get 2,2,0,0,0. Is there something wrong with my VS Code C++ configuration.

#include <iostream>
#include <cctype>

using namespace std;
int main(){
string my_string;
cout << "Enter a string: " ;
getline(cin,my_string);
cout << isalpha(my_string[0]) << endl;
cout << islower(my_string[0]) << endl;
cout << isupper(my_string[0]) << endl;
cout << isdigit(my_string[0]) << endl;
cout << isspace(my_string[0]) << endl;
return 0;
}


问:
Variables Not Being Passed To Detail View
I have an iPad app with UISplitViewController.  I'm trying to update detail view with 3 string properties.

I have the delegate setup but see other examples using id detailItem.

DetailView.m

```<code>- (void)setDetailItem:(id)newDetailItem {
    if (detailItem != newDetailItem) {
        [detailItem release];
        detailItem = [newDetailItem retain];
        NSLog(@"Text Should be here: %@", self.detailItem);
    }

    if (popoverController != nil) {
        [popoverController dismissPopoverAnimated:YES];
    }
}
</code>```

LeftView.m didSelectRowAtIndex

```<code>NSString *mystring = @"Test";
detailViewControlleriPad.detailItem = mystring;
</code>```

I want to just pass those 3 strings from left to detail view or even the NSManagedObject which will in turn update a tableview.

答: This is a great tutorial I found on how to use a SplitViewController, and pass data from on the detail view to the root view. Hope this helps!</p>

Body:
I have an iPad app with UISplitViewController.  I'm trying to update detail view with 3 string properties.

I have the delegate setup but see other examples using id detailItem.

DetailView.m

- (void)setDetailItem:(id)newDetailItem {
    if (detailItem != newDetailItem) {
        [detailItem release];
        detailItem = [newDetailItem retain];
        NSLog(@"Text Should be here: %@", self.detailItem);
    }

    if (popoverController != nil) {
        [popoverController dismissPopoverAnimated:YES];
    }
}

LeftView.m didSelectRowAtIndex

NSString *mystring = @"Test";
detailViewControlleriPad.detailItem = mystring;

I want to just pass those 3 strings from left to detail view or even the NSManagedObject which will in turn update a tableview.


问:
Add GitLab CI job to pipeline based on script command result
I have a GitLab CI pipeline with a 'migration' job which I want to be added only if certain files changed between current commit and master branch, but in my current project I'm forced to use GitLab CI pipelines for push event which complicates things.

Docs on rules:changes clearly states that it will glitch and will not work properly without MR (my case of push event), so that's out of question.

Docs on rules:if states that it only works with env variables. But docs on passing CI/CD variables to another job clearly states that

These variables cannot be used as CI/CD variables to configure a
pipeline, but they can be used in job scripts.

So, now I'm stuck. I can just skip running the job in question overriding the script and checking for file changes, but what I want is not adding the job in question to pipeline in first place.

答:
Sadly, to add/remove a Gitlab job based on variables created from a previous job is not possible for a given pipeline

A way to achieve this is if your break your current pipeline to an upstream and downstream

The upstream will have 2 jobs

The first one will use your script to define a variable

This job will trigger the downstream, passing this variable

Upstream

```<code>check_val:
 ...
 script:
   ... Script imposes the logic with the needed checks
   ... If true
   - echo "MY_CONDITIONAL_VAR=true" >> var.env
   ... If false
   - echo "MY_CONDITIONAL_VAR=false" >> var.env
 artifacts:
  reports:
    dotenv: var.env

trigger_your_original_pipeline:
    ...
    variables:
      MY_CONDITIONAL_VAR: "$MY_CONDITIONAL_VAR"
    trigger:
        project: "project_namespance/project"
</code>```

The downstream would be your original pipeline

Downstream

```<code>...
migration:
...
  rules:
   - if: '$MY_CONDITIONAL_VAR == "true"'
</code>```

Now the MY_CONDITIONAL_VAR will be available at the start of the pipeline, so you can impose rules to add or not the migration job

Body:
Sadly, to add/remove a Gitlab job based on variables created from a previous job is not possible for a given pipeline

A way to achieve this is if your break your current pipeline to an upstream and downstream

The upstream will have 2 jobs

The first one will use your script to define a variable

This job will trigger the downstream, passing this variable

Upstream

check_val:
 ...
 script:
   ... Script imposes the logic with the needed checks
   ... If true
   - echo "MY_CONDITIONAL_VAR=true" >> var.env
   ... If false
   - echo "MY_CONDITIONAL_VAR=false" >> var.env
 artifacts:
  reports:
    dotenv: var.env

trigger_your_original_pipeline:
    ...
    variables:
      MY_CONDITIONAL_VAR: "$MY_CONDITIONAL_VAR"
    trigger:
        project: "project_namespance/project"

The downstream would be your original pipeline

Downstream

...
migration:
...
  rules:
   - if: '$MY_CONDITIONAL_VAR == "true"'

Now the MY_CONDITIONAL_VAR will be available at the start of the pipeline, so you can impose rules to add or not the migration job


问:
How to visit pre-defined URLs from file
If I have 30 pages to check, for example, EN has a disclaimer, but other 29 language don't, what would be the best way to do this? For example, right now I have it like this:

const urls = ['http://google.com/en',
  'http://google.com/bg'
]

describe('Disclaimer check', () => {
  urls.forEach((url) => {
    it(`Checks disclaimer text ${url}`, () => {
      cy.visit(url)
      cy.get('.Disclaimer').should('be.visible')
        .and('contain', 'This is disclaimer.')
    })
  })
})```

For 2 sites it's fine to define them in the same code but other file that checks that Disclaimer isn't there would be 29 different URL-s. What would be the best practice here? One idea is to separate all the test but that would mean 30 tests for each feature which doesn't sound too great.

As url I'm working with uses many different values in it, making it short with baseurl doesn't seem to fit also.

Thank you in advance!

答:
Under your Fixtures folder create a urls.json file like this:

[
    "https://google.com/en",
    "https://google.com/bg",
    "https://url3.com",
    "https://url4.com"
]
```
<p>Now assuming that you know which URLs don't have the disclaimer, you can simply add them in the <code>If</code> condition and apply the <code>not.exist</code> assertion.</p>
<pre class="lang-js prettyprint-override"><code>import urls from '../fixtures/urls.json'

describe('Disclaimer check', () => {
  urls.forEach((url) => {
    it(`Checks disclaimer text ${url}`, () => {
      cy.visit(url)
      if (url == 'https://google.com/en' || url == 'https://url3.com') {
        //Check for URL's where disclaimer doesn't exist
        cy.get('.Disclaimer').should('not.exist')
      } else {
        //Check for URL's where disclaimer exists
        cy.get('.Disclaimer')
          .should('be.visible')
          .and('contain', 'This is disclaimer.')
      }
    })
  })
})

</code>```

Title: How to visit pre-defined URLs from file

Body:
If I have 30 pages to check, for example, EN has a disclaimer, but other 29 language don't, what would be the best way to do this? For example, right now I have it like this:

const urls = ['http://google.com/en',
  'http://google.com/bg'
]

describe('Disclaimer check', () => {
  urls.forEach((url) => {
    it(`Checks disclaimer text ${url}`, () => {
      cy.visit(url)
      cy.get('.Disclaimer').should('be.visible')
        .and('contain', 'This is disclaimer.')
    })
  })
})

For 2 sites it's fine to define them in the same code but other file that checks that Disclaimer isn't there would be 29 different URL-s. What would be the best practice here? One idea is to separate all the test but that would mean 30 tests for each feature which doesn't sound too great.

As url I'm working with uses many different values in it, making it short with baseurl doesn't seem to fit also.

Thank you in advance!

Body:
Under your Fixtures folder create a urls.json file like this:

[
    "https://google.com/en",
    "https://google.com/bg",
    "https://url3.com",
    "https://url4.com"
]

Now assuming that you know which URLs don't have the disclaimer, you can simply add them in the If condition and apply the not.exist assertion.

import urls from '../fixtures/urls.json'

describe('Disclaimer check', () => {
  urls.forEach((url) => {
    it(`Checks disclaimer text ${url}`, () => {
      cy.visit(url)
      if (url == 'https://google.com/en' || url == 'https://url3.com') {
        //Check for URL's where disclaimer doesn't exist
        cy.get('.Disclaimer').should('not.exist')
      } else {
        //Check for URL's where disclaimer exists
        cy.get('.Disclaimer')
          .should('be.visible')
          .and('contain', 'This is disclaimer.')
      }
    })
  })
})


问:
UITableView image on the left hand side

Possible Duplicate:

  adding images to UItableView

I want to add image in UITableView in the left hand side how could I add it?

答:
Just add image in cellForRowAtIndexPath method..

```<code> cell.imageView.image = yourImage;
</code>```

Title: UITableView image on the left hand side

Body:
Just add image in cellForRowAtIndexPath method..

 cell.imageView.image = yourImage;


问:
Is there a way to use the deap library in grasshopper
Is there a way I can use the deap library inside grasshopper's Python node
I want to run a genetic algorithm but the fitness function is to be calculated by grasshopper (only the fitness function, all the other things are to be taken of by deap inside the python node)
can it be done?

I am having problem with

importing the deap library in grasshopper's Python interface(I think I will be able to solve it by copying the files manually from Python path)

(major problem) grashopper doesn't allow closed loops so I cant seem to find a way to feed the fitness back into the Python node with the main code

答:
These are two well known issues with 'out-of-the-box' grasshopper but there are several plugins that can help overcome them.

Question One

The basic GHPython component uses Iron Python and can limit which libraries are compatible and able to be used. To get around this constraint there is a plugin called 'GH_CPython'. It allows you to set a locally installed python interpreter for your code, and then have access to any libraries available to that local interpreter. So if you install deap Libary locally then it will be available within the grasshopper GH_Cpython editor. Here is a link to download and install GH_CPython: https://www.food4rhino.com/en/app/ghcpython

Question Two

As you noted, Grasshopper is procedural and has limited support for recursive routines. To get around this there are several plugins that support recursion and may be able to help with your implementation. Which plugin would be best for your situation is difficult to say without a deeper description of your goals. Here are several options, each option provides recursive functionality that would allow for 'closed loops' where results of a script can be fed back as input.

Hoopsnake - very basic and has been around the longest

Anemone - A little more flexible and uses multiple components for loop start and end for cleaner-looking scripts. It also has a 'record history' functionality.

Octopus - Has a 'Loop' component that is similar to Hoopsnake. It also has a 'record history' functionality.


问:
How to delete columns based on the first two letters of a neighbouring column
I'm trying to write a vba code which will simplify the following kind of data:

Sample
Al %
Al ppm
B %
B ppm
Bi ppm
Bi ppm
Ca ppm
Cl ppm

x
0.58

50
80

y
0.51

65
90

z
0.76

80
150

by comparing the first 2 characters in a column heading so that only the one which contains data further down the column is kept. If there is no data in the column and the first two characters in the header are unique (in this case Ca and Cl) I would like to keep the column. The data set is always in alphabetical order so it should only have to look at the cells either side to check for a identical starting string. The simplification of the above table is shown below.

Sample
Al %
B ppm
Bi ppm
Ca ppm
Cl ppm

x
0.58
50
80

y
0.51
65
90

z
0.76
80
150

I think I can delete rows with identical duplicate headers using something like the bellow code, but I have no idea how to tailor it to the other criteria.

```<code>Sub columnfixer
Dim lastCol As Long
Dim thisCol As Long

With Sheets("OUTPUT")
lastCol = .Cells(1, Columns.Count).End(xlToLeft).Column
thisCol = 2
  Do While thisCol <= lastCol
     If Application.Match(.Cells(1, thisCol).Value, .Range("1:1"), 0) < thisCol Then
        .Cells(1, thisCol).EntireColumn.Delete xlShiftToLeft
        lastCol = lastCol - 1
     Else
        thisCol = thisCol + 1
     End If
  Loop
  End With
End Sub
</code>```

答:
Delete Range Blank Columns

Option Explicit

Sub DeleteRangeBlankColumnsTEST()

    Const fRow As Long = 2
    Const fCol As Long = 2

    Dim rg As Range
    Set rg = ThisWorkbook.Worksheets("OUTPUT").Range("A1").CurrentRegion

    ' Any data below the range will stay intact.
    DeleteRangeBlankColumns rg, fRow, fCol

    ' Any data below the range will also get deleted and shifted.
    'DeleteRangeBlankColumns rg, fRow, fCol, True

End Sub

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Purpose:      Starting from a column ('FirstColumn') of a range ('rg'),
'               it will delete all range (by default) or worksheet columns
'               ('DeleteEntireColumns = True') of the column ranges whose cells
'               from a row ('FirstRow') to the bottom are blank.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub DeleteRangeBlankColumns( _
        ByVal rg As Range, _
        Optional ByVal FirstRow As Long = 1, _
        Optional ByVal FirstColumn As Long = 1, _
        Optional ByVal DeleteEntireColumns As Boolean = False)
    Const ProcName As String = "DeleteRangeBlankColumns"
    On Error GoTo ClearError

    Dim drCount As Long: drCount = rg.Rows.Count - FirstRow + 1
    Dim dcCount As Long: dcCount = rg.Columns.Count - FirstColumn + 1

    Dim drg As Range ' Data Range
    Set drg = rg.Cells(FirstRow, FirstColumn).Resize(drCount, dcCount)

    Dim durg As Range ' Delete (Union) Range
    Dim dcrg As Range ' Data Colum Range

    For Each dcrg In drg.Columns
        If Application.CountBlank(dcrg) = drCount Then ' data column is blank
            If durg Is Nothing Then ' only first cell
                Set durg = dcrg.Cells(1)
            Else ' every cell but the first
                Set durg = Union(durg, dcrg.Cells(1))
            End If
        'Else ' data column is not blank
        End If
    Next dcrg

    If durg Is Nothing Then Exit Sub

    If DeleteEntireColumns Then
        durg.EntireColumn.Delete xlShiftToLeft
    Else
        Intersect(durg.EntireColumn, rg).Delete xlShiftToLeft
    End If

ProcExit:
    Exit Sub
ClearError:
    Debug.Print "'" & ProcName & "' Run-time error '" _
        & Err.Number & "':" & vbLf & "    " & Err.Description
    Resume ProcExit
End Sub
```
<h2>EDIT</h2>
<ul>
<li>This will identify the columns by the first two characters of their headers.</li>
<li>If a column is unique (found only once), the column will not get deleted even if it is blank.</li>
<li>If all 'matching' columns are blank, the left-most is kept.</li>
<li>Additionally, the 'matching' columns need not be grouped (consecutive).</li>
</ul>
<pre class="lang-vb prettyprint-override"><code>Sub DeleteColumnsCustomTEST()

    Const fRow As Long = 2
    Const fCol As Long = 2

    Dim rg As Range
    Set rg = ThisWorkbook.Worksheets("OUTPUT").Range("A1").CurrentRegion

    ' Any data below the range will stay intact.
    DeleteColumnsCustom rg, fRow, fCol, True

    ' Any data below the range will also get deleted and shifted.
    'DeleteColumnsCustom rg, fRow, fCol, True

End Sub

Sub DeleteColumnsCustom( _
        ByVal rg As Range, _
        Optional ByVal FirstRow As Long = 1, _
        Optional ByVal FirstColumn As Long = 1, _
        Optional ByVal DeleteEntireColumns As Boolean = False)
    Const ProcName As String = "DeleteColumnsCustom"
    On Error GoTo ClearError

    Set rg = ThisWorkbook.Worksheets("OUTPUT").Range("A1").CurrentRegion
    Dim cCount As Long: cCount = rg.Columns.Count

    Dim hrg As Range: Set hrg = rg.Rows(1)
    Dim hData As Variant: hData = hrg.Value

    Dim dict As Object: Set dict = CreateObject("Scripting.Dictionary")
    dict.CompareMode = vbTextCompare

    Dim cKey As Variant
    Dim c As Long

    For c = FirstColumn To cCount
        cKey = Left(hData(1, c), 2) ' use only first two characters
        If Not dict.Exists(cKey) Then
            Set dict(cKey) = New Collection ' new collection to hold the columns
        End If
        dict(cKey).Add c ' add characters as key and add column to collection
    Next c

    ' Reference the data range (no headers).
    Dim rCount As Long: rCount = rg.Rows.Count
    Dim drg As Range
    Set drg = rg.Resize(rCount - FirstRow + 1).Offset(FirstRow - 1)
    rCount = rCount - 1 ' or rCount = drg.rows.count

    Dim durg As Range
    Dim cItem As Variant
    Dim iCount As Long
    Dim i As Long
    Dim cCol As Long
    Dim KeeperFound As Boolean

    For Each cKey In dict.Keys
        iCount = dict(cKey).Count
        If iCount > 1 Then
            For i = iCount To 1 Step -1
                cCol = dict(cKey)(i)
                If i = 1 Then
                    If Not KeeperFound Then Exit For
                End If
                If Application.CountBlank(drg.Columns(cCol)) = rCount Then
                    If durg Is Nothing Then
                        Set durg = drg.Cells(cCol)
                    Else
                        Set durg = Union(durg, drg.Cells(cCol))
                    End If
                Else
                    KeeperFound = True
                End If
            Next i
            KeeperFound = False
        'Else ' one column only - do nothing
        End If
    Next cKey

    If durg Is Nothing Then Exit Sub

    If DeleteEntireColumns Then
        durg.EntireColumn.Delete xlShiftToLeft
    Else
        Intersect(durg.EntireColumn, rg).Delete xlShiftToLeft
    End If

ProcExit:
    Exit Sub
ClearError:
    Debug.Print "'" & ProcName & "' Run-time error '" _
        & Err.Number & "':" & vbLf & "    " & Err.Description
    Resume ProcExit
End Sub
</code>```

Body:
I'm trying to write a vba code which will simplify the following kind of data:

Sample
Al %
Al ppm
B %
B ppm
Bi ppm
Bi ppm
Ca ppm
Cl ppm

x
0.58

50
80

y
0.51

65
90

z
0.76

80
150

by comparing the first 2 characters in a column heading so that only the one which contains data further down the column is kept. If there is no data in the column and the first two characters in the header are unique (in this case Ca and Cl) I would like to keep the column. The data set is always in alphabetical order so it should only have to look at the cells either side to check for a identical starting string. The simplification of the above table is shown below.

Sample
Al %
B ppm
Bi ppm
Ca ppm
Cl ppm

x
0.58
50
80

y
0.51
65
90

z
0.76
80
150

I think I can delete rows with identical duplicate headers using something like the bellow code, but I have no idea how to tailor it to the other criteria.

Sub columnfixer
Dim lastCol As Long
Dim thisCol As Long

With Sheets("OUTPUT")
lastCol = .Cells(1, Columns.Count).End(xlToLeft).Column
thisCol = 2
  Do While thisCol <= lastCol
     If Application.Match(.Cells(1, thisCol).Value, .Range("1:1"), 0) < thisCol Then
        .Cells(1, thisCol).EntireColumn.Delete xlShiftToLeft
        lastCol = lastCol - 1
     Else
        thisCol = thisCol + 1
     End If
  Loop
  End With
End Sub

Body:
Delete Range Blank Columns

Option Explicit

Sub DeleteRangeBlankColumnsTEST()

    Const fRow As Long = 2
    Const fCol As Long = 2

    Dim rg As Range
    Set rg = ThisWorkbook.Worksheets("OUTPUT").Range("A1").CurrentRegion

    ' Any data below the range will stay intact.
    DeleteRangeBlankColumns rg, fRow, fCol

    ' Any data below the range will also get deleted and shifted.
    'DeleteRangeBlankColumns rg, fRow, fCol, True

End Sub

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Purpose:      Starting from a column ('FirstColumn') of a range ('rg'),
'               it will delete all range (by default) or worksheet columns
'               ('DeleteEntireColumns = True') of the column ranges whose cells
'               from a row ('FirstRow') to the bottom are blank.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub DeleteRangeBlankColumns( _
        ByVal rg As Range, _
        Optional ByVal FirstRow As Long = 1, _
        Optional ByVal FirstColumn As Long = 1, _
        Optional ByVal DeleteEntireColumns As Boolean = False)
    Const ProcName As String = "DeleteRangeBlankColumns"
    On Error GoTo ClearError

    Dim drCount As Long: drCount = rg.Rows.Count - FirstRow + 1
    Dim dcCount As Long: dcCount = rg.Columns.Count - FirstColumn + 1

    Dim drg As Range ' Data Range
    Set drg = rg.Cells(FirstRow, FirstColumn).Resize(drCount, dcCount)

    Dim durg As Range ' Delete (Union) Range
    Dim dcrg As Range ' Data Colum Range

    For Each dcrg In drg.Columns
        If Application.CountBlank(dcrg) = drCount Then ' data column is blank
            If durg Is Nothing Then ' only first cell
                Set durg = dcrg.Cells(1)
            Else ' every cell but the first
                Set durg = Union(durg, dcrg.Cells(1))
            End If
        'Else ' data column is not blank
        End If
    Next dcrg

    If durg Is Nothing Then Exit Sub

    If DeleteEntireColumns Then
        durg.EntireColumn.Delete xlShiftToLeft
    Else
        Intersect(durg.EntireColumn, rg).Delete xlShiftToLeft
    End If

ProcExit:
    Exit Sub
ClearError:
    Debug.Print "'" & ProcName & "' Run-time error '" _
        & Err.Number & "':" & vbLf & "    " & Err.Description
    Resume ProcExit
End Sub

EDIT

This will identify the columns by the first two characters of their headers.

If a column is unique (found only once), the column will not get deleted even if it is blank.

If all 'matching' columns are blank, the left-most is kept.

Additionally, the 'matching' columns need not be grouped (consecutive).

Sub DeleteColumnsCustomTEST()

    Const fRow As Long = 2
    Const fCol As Long = 2

    Dim rg As Range
    Set rg = ThisWorkbook.Worksheets("OUTPUT").Range("A1").CurrentRegion

    ' Any data below the range will stay intact.
    DeleteColumnsCustom rg, fRow, fCol, True

    ' Any data below the range will also get deleted and shifted.
    'DeleteColumnsCustom rg, fRow, fCol, True

End Sub

Sub DeleteColumnsCustom( _
        ByVal rg As Range, _
        Optional ByVal FirstRow As Long = 1, _
        Optional ByVal FirstColumn As Long = 1, _
        Optional ByVal DeleteEntireColumns As Boolean = False)
    Const ProcName As String = "DeleteColumnsCustom"
    On Error GoTo ClearError

    Set rg = ThisWorkbook.Worksheets("OUTPUT").Range("A1").CurrentRegion
    Dim cCount As Long: cCount = rg.Columns.Count

    Dim hrg As Range: Set hrg = rg.Rows(1)
    Dim hData As Variant: hData = hrg.Value

    Dim dict As Object: Set dict = CreateObject("Scripting.Dictionary")
    dict.CompareMode = vbTextCompare

    Dim cKey As Variant
    Dim c As Long

    For c = FirstColumn To cCount
        cKey = Left(hData(1, c), 2) ' use only first two characters
        If Not dict.Exists(cKey) Then
            Set dict(cKey) = New Collection ' new collection to hold the columns
        End If
        dict(cKey).Add c ' add characters as key and add column to collection
    Next c

    ' Reference the data range (no headers).
    Dim rCount As Long: rCount = rg.Rows.Count
    Dim drg As Range
    Set drg = rg.Resize(rCount - FirstRow + 1).Offset(FirstRow - 1)
    rCount = rCount - 1 ' or rCount = drg.rows.count

    Dim durg As Range
    Dim cItem As Variant
    Dim iCount As Long
    Dim i As Long
    Dim cCol As Long
    Dim KeeperFound As Boolean

    For Each cKey In dict.Keys
        iCount = dict(cKey).Count
        If iCount > 1 Then
            For i = iCount To 1 Step -1
                cCol = dict(cKey)(i)
                If i = 1 Then
                    If Not KeeperFound Then Exit For
                End If
                If Application.CountBlank(drg.Columns(cCol)) = rCount Then
                    If durg Is Nothing Then
                        Set durg = drg.Cells(cCol)
                    Else
                        Set durg = Union(durg, drg.Cells(cCol))
                    End If
                Else
                    KeeperFound = True
                End If
            Next i
            KeeperFound = False
        'Else ' one column only - do nothing
        End If
    Next cKey

    If durg Is Nothing Then Exit Sub

    If DeleteEntireColumns Then
        durg.EntireColumn.Delete xlShiftToLeft
    Else
        Intersect(durg.EntireColumn, rg).Delete xlShiftToLeft
    End If

ProcExit:
    Exit Sub
ClearError:
    Debug.Print "'" & ProcName & "' Run-time error '" _
        & Err.Number & "':" & vbLf & "    " & Err.Description
    Resume ProcExit
End Sub


问:
"#include" a text file in a C program as a char[]
Is there a way to include an entire text file as a string in a C program at compile-time?

something like:

file.txt:

```<code>This is
a little
text file
</code>```

main.c:

```<code>#include <stdio.h>
int main(void) {
   #blackmagicinclude("file.txt", content)
   /*
   equiv: char[] content = "This is\na little\ntext file";
   */
   printf("%s", content);
}
</code>```

obtaining a little program that prints on stdout "This is
a little
text file"

At the moment I used an hackish python script, but it's butt-ugly and limited to only one variable name, can you tell me another way to do it?

答:
You can use assembly for this:</p>
```<code>asm("fileData:    .incbin \"filename.ext\"");
asm("fileDataEnd: db 0x00");

extern char fileData[];
extern char fileDataEnd[];
const int fileDataSize = fileDataEnd - fileData + 1;
</code>```

OwnerDisplayName: ZeD

ContentLicense: CC BY-SA 2.5

Body:
Is there a way to include an entire text file as a string in a C program at compile-time?

something like:

file.txt:

This is
a little
text file

main.c:

#include <stdio.h>
int main(void) {
   #blackmagicinclude("file.txt", content)
   /*
   equiv: char[] content = "This is\na little\ntext file";
   */
   printf("%s", content);
}

obtaining a little program that prints on stdout "This is
a little
text file"

At the moment I used an hackish python script, but it's butt-ugly and limited to only one variable name, can you tell me another way to do it?

Body:
You can use assembly for this:

asm("fileData:    .incbin \"filename.ext\"");
asm("fileDataEnd: db 0x00");

extern char fileData[];
extern char fileDataEnd[];
const int fileDataSize = fileDataEnd - fileData + 1;


问:
How to store string with tabs in a list in python
Looks like im missing something very simple here. I have list of elements in this format now few elements in the list have '\t' (tab or multiple tabs). Now instead of '\t' i want to store them as tab in the list. I iterating over each element and doing .replace('\t', '  ') clearly this isnt working.

l = ['test', '\tabc', '\t\tcde']

I want this to be stored as

l = ['test', 'abc', 'cde'] #It isnt allowing to add whitespaces I am looking to add is 2 space or 4 space indent based on number of \t infront of an element.

Can someone please help?

答:
Here is my attempt:

```<code>l = ['test', '\tabc', '\t\tcde']
l = list(map(lambda elem: elem.replace('\t', ' '), l))

print(l)
</code>```

Output:

```<code>['test', ' abc', '  cde']
</code>```

Body:
Here is my attempt:

l = ['test', '\tabc', '\t\tcde']
l = list(map(lambda elem: elem.replace('\t', ' '), l))

print(l)

Output:

['test', ' abc', '  cde']