Namespaces gone after change systemdirectory - whatsnow - 09-03-2023
Hi
I'm very new to namespace stuff, i'm rebuilding my application CI3 to CI4 and and i'm some libraries with composer.
when is split my folder structure in the way i want almost all the namespaces are gone except the following below, it look it happens when i change the following variable: $systemDirectory
php spark namespaces
+-------------+--------------------------------------------------------------+--------+
| Namespace | Path | Found? |
+-------------+--------------------------------------------------------------+--------+
| CodeIgniter | /var/www/site-com/htdocs/vendor/codeigniter4/framework... | Yes |
| App | ROOTPATH/App | Yes |
| Config | APPPATH/Config | Yes |
+-------------+--------------------------------------------------------------+--------+
All namespaces of this small list working, but i'm missing alot of namespaces from the vendor folder.
The following things i have tried but not succes:
- composer dump-autoload
- composer update
I'm using version: 4.4.0
What can i do to fix this?
Kind regards,
whatsnow
RE: Namespaces gone after change systemdirectory - captain-sensible - 09-03-2023
As yoda might not have once said " the force is not strong in me tonight" so .
You changed $systemdirectory but dont say what to.
I can't see your structure .
here is my in progress latest
Code: [andrew@darkstar http]$ tree -L 1 joesoapdev
joesoapdev
├── Gruntfile.js
├── LICENSE
├── README.md
├── app
├── builds
├── composer.json
├── composer.lock
├── node_modules
├── package-lock.json
├── package.json
├── phpunit.xml.dist
├── public
├── scss
├── spark
├── tests
├── vendor
└── writable
here is my variable for systempath
Code: public string $systemDirectory = __DIR__ . '/../../vendor/codeigniter4/framework/system';
could you do show us yours so we can get a handle on it
RE: Namespaces gone after change systemdirectory - whatsnow - 09-03-2023
Hi,
Thank you for the quick response, the variable: public string $systemDirectory = '/var/www/site-com/htdocs/vendor/codeigniter4/framework/system';
I hope its fit to forum, here my tree structure:
Code: htdocs
├── Applications
│ └── App
│ ├── Config
│ │ └── Boot
│ ├── Controllers
│ ├── Database
│ │ ├── Migrations
│ │ └── Seeds
│ ├── Filters
│ ├── Helpers
│ ├── Language
│ │ └── en
│ ├── Libraries
│ ├── Models
│ ├── ThirdParty
│ └── Views
│ ├── htdocs
│ └── logs
├── tests
│ ├── database
│ ├── session
│ ├── _support
│ │ ├── Database
│ │ │ ├── Migrations
│ │ │ └── Seeds
│ │ ├── Libraries
│ │ └── Models
│ └── unit
├── vendor
│ ├── bin
│ ├── codeigniter4
│ │ └── framework
│ │ ├── app
│ │ │ ├── Config
│ │ │ │ └── Boot
│ │ │ ├── Controllers
│ │ │ ├── Database
│ │ │ │ ├── Migrations
│ │ │ │ └── Seeds
│ │ │ ├── Filters
│ │ │ ├── Helpers
│ │ │ ├── Language
│ │ │ │ └── en
│ │ │ ├── Libraries
│ │ │ ├── Models
│ │ │ ├── ThirdParty
│ │ │ └── Views
│ │ │ └── errors
│ │ │ ├── cli
│ │ │ └── html
│ │ ├── public
│ │ ├── system
│ │ │ ├── API
│ │ │ ├── Autoloader
│ │ │ ├── Cache
│ │ │ │ ├── Exceptions
│ │ │ │ ├── FactoriesCache
│ │ │ │ └── Handlers
│ │ │ ├── CLI
│ │ │ │ └── Exceptions
│ │ │ ├── Commands
│ │ │ │ ├── Cache
│ │ │ │ ├── Database
│ │ │ │ ├── Encryption
│ │ │ │ ├── Generators
│ │ │ │ │ └── Views
│ │ │ │ ├── Housekeeping
│ │ │ │ ├── Server
│ │ │ │ └── Utilities
│ │ │ │ └── Routes
│ │ │ │ └── AutoRouterImproved
│ │ │ ├── Config
│ │ │ ├── Cookie
│ │ │ │ └── Exceptions
│ │ │ ├── Database
│ │ │ │ ├── Exceptions
│ │ │ │ ├── MySQLi
│ │ │ │ ├── OCI8
│ │ │ │ ├── Postgre
│ │ │ │ ├── SQLite3
│ │ │ │ └── SQLSRV
│ │ │ ├── Debug
│ │ │ │ └── Toolbar
│ │ │ │ ├── Collectors
│ │ │ │ └── Views
│ │ │ ├── Email
│ │ │ ├── Encryption
│ │ │ │ ├── Exceptions
│ │ │ │ └── Handlers
│ │ │ ├── Entity
│ │ │ │ ├── Cast
│ │ │ │ └── Exceptions
│ │ │ ├── Events
│ │ │ ├── Exceptions
│ │ │ ├── Files
│ │ │ │ └── Exceptions
│ │ │ ├── Filters
│ │ │ │ └── Exceptions
│ │ │ ├── Format
│ │ │ │ └── Exceptions
│ │ │ ├── Helpers
│ │ │ ├── Honeypot
│ │ │ │ └── Exceptions
│ │ │ ├── HotReloader
│ │ │ ├── HTTP
│ │ │ │ ├── Exceptions
│ │ │ │ └── Files
│ │ │ ├── I18n
│ │ │ │ └── Exceptions
│ │ │ ├── Images
│ │ │ │ ├── Exceptions
│ │ │ │ └── Handlers
│ │ │ ├── Language
│ │ │ │ └── en
│ │ │ ├── Log
│ │ │ │ ├── Exceptions
│ │ │ │ └── Handlers
│ │ │ ├── Modules
│ │ │ ├── Pager
│ │ │ │ ├── Exceptions
│ │ │ │ └── Views
│ │ │ ├── Publisher
│ │ │ │ └── Exceptions
│ │ │ ├── RESTful
│ │ │ ├── Router
│ │ │ │ └── Exceptions
│ │ │ ├── Security
│ │ │ │ └── Exceptions
│ │ │ ├── Session
│ │ │ │ ├── Exceptions
│ │ │ │ └── Handlers
│ │ │ │ └── Database
│ │ │ ├── Test
│ │ │ │ ├── Constraints
│ │ │ │ ├── Filters
│ │ │ │ ├── Interfaces
│ │ │ │ └── Mock
│ │ │ ├── ThirdParty
│ │ │ │ ├── Escaper
│ │ │ │ │ └── Exception
│ │ │ │ ├── Kint
│ │ │ │ │ ├── Parser
│ │ │ │ │ ├── Renderer
│ │ │ │ │ │ ├── Rich
│ │ │ │ │ │ └── Text
│ │ │ │ │ ├── resources
│ │ │ │ │ │ └── compiled
│ │ │ │ │ └── Zval
│ │ │ │ │ └── Representation
│ │ │ │ └── PSR
│ │ │ │ └── Log
│ │ │ ├── Throttle
│ │ │ ├── Traits
│ │ │ ├── Typography
│ │ │ ├── Validation
│ │ │ │ ├── Exceptions
│ │ │ │ ├── StrictRules
│ │ │ │ └── Views
│ │ │ └── View
│ │ │ ├── Cells
│ │ │ └── Exceptions
│ │ ├── tests
│ │ │ ├── database
│ │ │ ├── session
│ │ │ ├── _support
│ │ │ │ ├── Database
│ │ │ │ │ ├── Migrations
│ │ │ │ │ └── Seeds
│ │ │ │ ├── Libraries
│ │ │ │ └── Models
│ │ │ └── unit
│ │ └── writable
│ │ ├── cache
│ │ ├── debugbar
│ │ ├── logs
│ │ ├── session
│ │ └── uploads
│ ├── composer
│ ├── doctrine
│ │ └── instantiator
│ │ ├── docs
│ │ │ └── en
│ │ └── src
│ │ └── Doctrine
│ │ └── Instantiator
│ │ └── Exception
│ ├── fakerphp
│ │ └── faker
│ │ └── src
│ │ └── Faker
│ │ ├── Calculator
│ │ ├── Container
│ │ ├── Core
│ │ ├── Extension
│ │ ├── Guesser
│ │ ├── ORM
│ │ │ ├── CakePHP
│ │ │ ├── Doctrine
│ │ │ ├── Mandango
│ │ │ ├── Propel
│ │ │ ├── Propel2
│ │ │ └── Spot
│ │ └── Provider
│ │ ├── ar_EG
│ │ ├── ar_JO
│ │ ├── ar_SA
│ │ ├── at_AT
│ │ ├── bg_BG
│ │ ├── bn_BD
│ │ ├── cs_CZ
│ │ ├── da_DK
│ │ ├── de_AT
│ │ ├── de_CH
│ │ ├── de_DE
│ │ ├── el_CY
│ │ ├── el_GR
│ │ ├── en_AU
│ │ ├── en_CA
│ │ ├── en_GB
│ │ ├── en_HK
│ │ ├── en_IN
│ │ ├── en_NG
│ │ ├── en_NZ
│ │ ├── en_PH
│ │ ├── en_SG
│ │ ├── en_UG
│ │ ├── en_US
│ │ ├── en_ZA
│ │ ├── es_AR
│ │ ├── es_ES
│ │ ├── es_PE
│ │ ├── es_VE
│ │ ├── et_EE
│ │ ├── fa_IR
│ │ ├── fi_FI
│ │ ├── fr_BE
│ │ ├── fr_CA
│ │ ├── fr_CH
│ │ ├── fr_FR
│ │ ├── he_IL
│ │ ├── hr_HR
│ │ ├── hu_HU
│ │ ├── hy_AM
│ │ ├── id_ID
│ │ ├── is_IS
│ │ ├── it_CH
│ │ ├── it_IT
│ │ ├── ja_JP
│ │ ├── ka_GE
│ │ ├── kk_KZ
│ │ ├── ko_KR
│ │ ├── lt_LT
│ │ ├── lv_LV
│ │ ├── me_ME
│ │ ├── mn_MN
│ │ ├── ms_MY
│ │ ├── nb_NO
│ │ ├── ne_NP
│ │ ├── nl_BE
│ │ ├── nl_NL
│ │ ├── pl_PL
│ │ ├── pt_BR
│ │ ├── pt_PT
│ │ ├── ro_MD
│ │ ├── ro_RO
│ │ ├── ru_RU
│ │ ├── sk_SK
│ │ ├── sl_SI
│ │ ├── sr_Cyrl_RS
│ │ ├── sr_Latn_RS
│ │ ├── sr_RS
│ │ ├── sv_SE
│ │ ├── th_TH
│ │ ├── tr_TR
│ │ ├── uk_UA
│ │ ├── vi_VN
│ │ ├── zh_CN
│ │ └── zh_TW
│ ├── laminas
│ │ └── laminas-escaper
│ │ └── src
│ │ └── Exception
│ ├── mikey179
│ │ └── vfsstream
│ │ └── src
│ │ ├── main
│ │ │ └── php
│ │ │ └── org
│ │ │ └── bovigo
│ │ │ └── vfs
│ │ │ ├── content
│ │ │ └── visitor
│ │ └── test
│ │ ├── patches
│ │ ├── php
│ │ │ └── org
│ │ │ └── bovigo
│ │ │ └── vfs
│ │ │ ├── content
│ │ │ ├── proxy
│ │ │ └── visitor
│ │ ├── phpt
│ │ └── resources
│ │ └── filesystemcopy
│ │ ├── emptyFolder
│ │ └── withSubfolders
│ │ ├── subfolder1
│ │ └── subfolder2
│ ├── myclabs
│ │ └── deep-copy
│ │ └── src
│ │ └── DeepCopy
│ │ ├── Exception
│ │ ├── Filter
│ │ │ └── Doctrine
│ │ ├── Matcher
│ │ │ └── Doctrine
│ │ ├── Reflection
│ │ ├── TypeFilter
│ │ │ ├── Date
│ │ │ └── Spl
│ │ └── TypeMatcher
│ ├── nikic
│ │ └── php-parser
│ │ ├── bin
│ │ ├── grammar
│ │ └── lib
│ │ └── PhpParser
│ │ ├── Builder
│ │ ├── Comment
│ │ ├── ErrorHandler
│ │ ├── Internal
│ │ ├── Lexer
│ │ │ └── TokenEmulator
│ │ ├── Node
│ │ │ ├── Expr
│ │ │ │ ├── AssignOp
│ │ │ │ ├── BinaryOp
│ │ │ │ └── Cast
│ │ │ ├── Name
│ │ │ ├── Scalar
│ │ │ │ └── MagicConst
│ │ │ └── Stmt
│ │ │ └── TraitUseAdaptation
│ │ ├── NodeVisitor
│ │ ├── Parser
│ │ └── PrettyPrinter
│ ├── phar-io
│ │ ├── manifest
│ │ │ └── src
│ │ │ ├── exceptions
│ │ │ ├── values
│ │ │ └── xml
│ │ └── version
│ │ └── src
│ │ ├── constraints
│ │ └── exceptions
│ ├── phpunit
│ │ ├── php-code-coverage
│ │ │ └── src
│ │ │ ├── Driver
│ │ │ ├── Exception
│ │ │ ├── Node
│ │ │ ├── Report
│ │ │ │ ├── Html
│ │ │ │ │ └── Renderer
│ │ │ │ │ └── Template
│ │ │ │ │ ├── css
│ │ │ │ │ ├── icons
│ │ │ │ │ └── js
│ │ │ │ └── Xml
│ │ │ ├── StaticAnalysis
│ │ │ └── Util
│ │ ├── php-file-iterator
│ │ │ └── src
│ │ ├── php-invoker
│ │ │ └── src
│ │ │ └── exceptions
│ │ ├── php-text-template
│ │ │ └── src
│ │ │ └── exceptions
│ │ ├── php-timer
│ │ │ └── src
│ │ │ └── exceptions
│ │ └── phpunit
│ │ ├── schema
│ │ └── src
│ │ ├── Framework
│ │ │ ├── Assert
│ │ │ ├── Constraint
│ │ │ │ ├── Boolean
│ │ │ │ ├── Cardinality
│ │ │ │ ├── Equality
│ │ │ │ ├── Exception
│ │ │ │ ├── Filesystem
│ │ │ │ ├── Math
│ │ │ │ ├── Object
│ │ │ │ ├── Operator
│ │ │ │ ├── String
│ │ │ │ ├── Traversable
│ │ │ │ └── Type
│ │ │ ├── Error
│ │ │ ├── Exception
│ │ │ └── MockObject
│ │ │ ├── Api
│ │ │ ├── Builder
│ │ │ ├── Exception
│ │ │ ├── Generator
│ │ │ ├── Rule
│ │ │ └── Stub
│ │ ├── Runner
│ │ │ ├── Extension
│ │ │ ├── Filter
│ │ │ └── Hook
│ │ ├── TextUI
│ │ │ ├── CliArguments
│ │ │ ├── Exception
│ │ │ └── XmlConfiguration
│ │ │ ├── CodeCoverage
│ │ │ │ ├── Filter
│ │ │ │ └── Report
│ │ │ ├── Filesystem
│ │ │ ├── Group
│ │ │ ├── Logging
│ │ │ │ └── TestDox
│ │ │ ├── Migration
│ │ │ │ └── Migrations
│ │ │ ├── PHP
│ │ │ ├── PHPUnit
│ │ │ └── TestSuite
│ │ └── Util
│ │ ├── Annotation
│ │ ├── Log
│ │ ├── PHP
│ │ │ └── Template
│ │ ├── TestDox
│ │ └── Xml
│ ├── psr
│ │ ├── container
│ │ │ └── src
│ │ └── log
│ │ └── Psr
│ │ └── Log
│ │ └── Test
│ ├── sebastian
│ │ ├── cli-parser
│ │ │ └── src
│ │ │ └── exceptions
│ │ ├── code-unit
│ │ │ └── src
│ │ │ └── exceptions
│ │ ├── code-unit-reverse-lookup
│ │ │ └── src
│ │ ├── comparator
│ │ │ └── src
│ │ │ └── exceptions
│ │ ├── complexity
│ │ │ └── src
│ │ │ ├── Complexity
│ │ │ ├── Exception
│ │ │ └── Visitor
│ │ ├── diff
│ │ │ └── src
│ │ │ ├── Exception
│ │ │ └── Output
│ │ ├── environment
│ │ │ └── src
│ │ ├── exporter
│ │ │ └── src
│ │ ├── global-state
│ │ │ └── src
│ │ │ └── exceptions
│ │ ├── lines-of-code
│ │ │ └── src
│ │ │ └── Exception
│ │ ├── object-enumerator
│ │ │ └── src
│ │ ├── object-reflector
│ │ │ └── src
│ │ ├── recursion-context
│ │ │ └── src
│ │ ├── resource-operations
│ │ │ ├── build
│ │ │ └── src
│ │ ├── type
│ │ │ └── src
│ │ │ ├── exception
│ │ │ └── type
│ │ └── version
│ │ └── src
│ ├── symfony
│ │ ├── deprecation-contracts
│ │ ├── polyfill-ctype
│ │ └── polyfill-mbstring
│ │ └── Resources
│ │ └── unidata
│ ├── theseer
│ │ └── tokenizer
│ │ └── src
│ └── twig
│ └── twig
│ └── src
│ ├── Cache
│ ├── Error
│ ├── Extension
│ ├── Loader
│ ├── Node
│ │ └── Expression
│ │ ├── Binary
│ │ ├── Filter
│ │ ├── Test
│ │ └── Unary
│ ├── NodeVisitor
│ ├── Profiler
│ │ ├── Dumper
│ │ ├── Node
│ │ └── NodeVisitor
│ ├── RuntimeLoader
│ ├── Sandbox
│ ├── Test
│ ├── TokenParser
│ └── Util
├── writable
│ ├── cache
│ ├── debugbar
│ ├── logs
│ ├── session
│ └── uploads
├── www << where my index.php is stored.
RE: Namespaces gone after change systemdirectory - whatsnow - 09-03-2023
I found out that variable: APPPATH was set to : ../ after is changed ../../ it works on line 37 bootstrap.php in the vendor folder.
I when i print it , it was set to the Application folder and then vendor folder.
Before:
Code: f (! defined('ROOTPATH')) {
define('ROOTPATH', realpath(APPPATH . '../') . DIRECTORY_SEPARATOR);
}
After:
Code: f (! defined('ROOTPATH')) {
define('ROOTPATH', realpath(APPPATH . '../../') . DIRECTORY_SEPARATOR);
}
|