Giter Club home page Giter Club logo

Comments (13)

dxops avatar dxops commented on May 30, 2024 1

Just faced with this issue. bower-asset vendor appears in vendors but it should not. Going to investigate it right now

from orocommerce.

dxops avatar dxops commented on May 30, 2024 1

@gplanchat fixed by oroinc/platform@66b9a37#diff-86b34a281537a8a59f33555c7ffd0591R103

from orocommerce.

mbessolov avatar mbessolov commented on May 30, 2024

Please make sure you have the "fxp/composer-asset-plugin" composer plugin installed globally, and run composer install again.

from orocommerce.

gplanchat avatar gplanchat commented on May 30, 2024

Indeed, fxp/composer-asset-plugin is installed globally already but the issue appeared, still.

from orocommerce.

mbessolov avatar mbessolov commented on May 30, 2024

If the fxp/composer-asset-plugin is installed, then you should not have vendor/bower-asset/backbone.paginator directory at all. And if it is there for some reason - then it is not OroCommerce related as there is no such composer dependency in OroCommerce application that would be installed in vendor folder.

from orocommerce.

gplanchat avatar gplanchat commented on May 30, 2024

It is a fresh install of the beta 5, fetched by git clone and composer install, no additional library was present

from orocommerce.

gplanchat avatar gplanchat commented on May 30, 2024

Isn't there a something to do to prevent this silent break ?

from orocommerce.

aivus avatar aivus commented on May 30, 2024

@gplanchat I have tested it. All works fine:

# composer global require "fxp/composer-asset-plugin:~1.2
# g clone [email protected]:orocommerce/orocommerce-application.git commerce_public
# cd commerce_public
# gco release/commerce-1.0.0-beta.5
# composer install
# app/console oro:install ...
Oro Application has been successfully installed in dev mode.
To run application in prod mode, please run cache:clear command with --env prod parameter

from orocommerce.

dxops avatar dxops commented on May 30, 2024

Here is check that should not allow installing if fxp/composer-asset-plugin plugin is missing https://github.com/orocommerce/orocommerce-application/blob/release/commerce-1.0.0-beta.5/composer.json#L36

In the end of composer install you should have an exception that will ask you to install plugin

from orocommerce.

gplanchat avatar gplanchat commented on May 30, 2024

Yes @SergeyZ, I saw the test appearing on the last commit yesterday, I had to update the fxp/composer-asset-pluginversion.

The original issue comes from this \RecursiveDirectoryIterator iterator:
https://github.com/orocrm/platform/blob/master/src/Oro/Bundle/DistributionBundle/OroKernel.php#L96

<?php
    /**
     * Finds all .../Resource/config/oro/bundles.yml in given root folders
     *
     * @param array $roots
     *
     * @return array
     */
    protected function findBundles($roots = array())
    {
        $paths = array();
        foreach ($roots as $root) {
            if (!is_dir($root)) {
                continue;
            }
            $root   = realpath($root);
            $dir    = new \RecursiveDirectoryIterator($root, \FilesystemIterator::FOLLOW_SYMLINKS);
            $filter = new \RecursiveCallbackFilterIterator(
                $dir,
                function (\SplFileInfo $current) use (&$paths) {
                    $fileName = strtolower($current->getFilename());
                    if ($fileName === '.'
                        || $fileName === '..'
                        || $fileName === 'tests'
                        || $current->isFile()
                    ) {
                        return false;
                    }
                    if (!is_dir($current->getPathname() . '/Resources')) {
                        return true;
                    } else {
                        $file = $current->getPathname() . '/Resources/config/oro/bundles.yml';
                        if (is_file($file)) {
                            $paths[] = $file;
                        }

                        return false;
                    }
                }
            );

            $iterator = new \RecursiveIteratorIterator($filter);
            $iterator->rewind();
        }

        return $paths;
    }

While I had a broken symlink in the vendor dir, the iterator ended the loop, without throwing any exception or displaying any error information.

Maybe it is because of the \FilesystemIterator::FOLLOW_SYMLINKS, I didn't test further (once the link deleted, it worked again properly)

For the record, I'm using PHP 7.0 :

$ php -v
PHP 7.0.13 (cli) (built: Nov 15 2016 23:48:44) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.13, Copyright (c) 1999-2016, by Zend Technologies

$ php -m
[PHP Modules]
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
ldap
libxml
mbstring
mcrypt
mysqli
mysqlnd
odbc
openssl
pcntl
pcre
PDO
pdo_mysql
PDO_ODBC
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

from orocommerce.

dxops avatar dxops commented on May 30, 2024

I was not able to reproduce this case on a clean 1.0.0-beta.5 instance. Please remove vendors, revert composer.lock if you did composer update and do composer install

It looks like vendor/bower-asset appears after composer update with non-empty vendors folder and I'm going to investigate it too

from orocommerce.

dxops avatar dxops commented on May 30, 2024

Caused by missing

  "extra": {
    "asset-installer-paths": {
      "npm-asset-library": "web/bundles/npmassets",
      "bower-asset-library": "web/bundles/bowerassets"
    }
  }

make sure you use the proper application tag git checkout tags/1.0.0-beta.5

OroKernel.php will be fixed in any case

from orocommerce.

gplanchat avatar gplanchat commented on May 30, 2024

I was using branch release/commerce-1.0.0beta.5, not the tag (from https://github.com/orocommerce/orocommerce-application). Nevertheless the extra section contained the info you posted in your last message.

from orocommerce.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.