PRS-4 - Why does Class 'App\TgHelpers\TelegramCommandsProcess' not found?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
The structure of my project is as follows:
Handler.php
is input script. Here is its beginning:
require "vendor/autoload.php";
use AppTgHelpersTelegramCommandsProcess;
$tgProcessor = new TelegramCommandsProcess();
All scripts are in the same namespace - App. An error is displayed in the logs:
PHP Fatal error: Uncaught Error: Class 'App\TgHelpers\TelegramCommandsProcess' not found
What am I doing wrong?
Here is the autoload field in composer.json
:
"autoload": {
"psr-4": {
"App\": "testVersionTelegramForecast//"
}
}
php composer-php psr-4
add a comment |
The structure of my project is as follows:
Handler.php
is input script. Here is its beginning:
require "vendor/autoload.php";
use AppTgHelpersTelegramCommandsProcess;
$tgProcessor = new TelegramCommandsProcess();
All scripts are in the same namespace - App. An error is displayed in the logs:
PHP Fatal error: Uncaught Error: Class 'App\TgHelpers\TelegramCommandsProcess' not found
What am I doing wrong?
Here is the autoload field in composer.json
:
"autoload": {
"psr-4": {
"App\": "testVersionTelegramForecast//"
}
}
php composer-php psr-4
Can you try with use AppTgHelpersTelegramCommandsProcess; instead of use AppTgHelpersTelegramCommandsProcess;
– Web Artisan
Nov 16 '18 at 12:07
@WebArtisan, already tried. Result is the same
– Racoon
Nov 16 '18 at 12:08
add a comment |
The structure of my project is as follows:
Handler.php
is input script. Here is its beginning:
require "vendor/autoload.php";
use AppTgHelpersTelegramCommandsProcess;
$tgProcessor = new TelegramCommandsProcess();
All scripts are in the same namespace - App. An error is displayed in the logs:
PHP Fatal error: Uncaught Error: Class 'App\TgHelpers\TelegramCommandsProcess' not found
What am I doing wrong?
Here is the autoload field in composer.json
:
"autoload": {
"psr-4": {
"App\": "testVersionTelegramForecast//"
}
}
php composer-php psr-4
The structure of my project is as follows:
Handler.php
is input script. Here is its beginning:
require "vendor/autoload.php";
use AppTgHelpersTelegramCommandsProcess;
$tgProcessor = new TelegramCommandsProcess();
All scripts are in the same namespace - App. An error is displayed in the logs:
PHP Fatal error: Uncaught Error: Class 'App\TgHelpers\TelegramCommandsProcess' not found
What am I doing wrong?
Here is the autoload field in composer.json
:
"autoload": {
"psr-4": {
"App\": "testVersionTelegramForecast//"
}
}
php composer-php psr-4
php composer-php psr-4
edited Nov 16 '18 at 12:30
Racoon
asked Nov 16 '18 at 11:59
RacoonRacoon
248
248
Can you try with use AppTgHelpersTelegramCommandsProcess; instead of use AppTgHelpersTelegramCommandsProcess;
– Web Artisan
Nov 16 '18 at 12:07
@WebArtisan, already tried. Result is the same
– Racoon
Nov 16 '18 at 12:08
add a comment |
Can you try with use AppTgHelpersTelegramCommandsProcess; instead of use AppTgHelpersTelegramCommandsProcess;
– Web Artisan
Nov 16 '18 at 12:07
@WebArtisan, already tried. Result is the same
– Racoon
Nov 16 '18 at 12:08
Can you try with use AppTgHelpersTelegramCommandsProcess; instead of use AppTgHelpersTelegramCommandsProcess;
– Web Artisan
Nov 16 '18 at 12:07
Can you try with use AppTgHelpersTelegramCommandsProcess; instead of use AppTgHelpersTelegramCommandsProcess;
– Web Artisan
Nov 16 '18 at 12:07
@WebArtisan, already tried. Result is the same
– Racoon
Nov 16 '18 at 12:08
@WebArtisan, already tried. Result is the same
– Racoon
Nov 16 '18 at 12:08
add a comment |
1 Answer
1
active
oldest
votes
the register must match AppTgHelpers => project/TgHelpers
,
composer.json
should be at the root of your project
project/
tgHelpers/
TelegramCommandsProcess.php
Handler.php
composer.json
vendor/
autoload.php
In Handler.php
require __DIR__ . '/../vendor/autoload.php';
but it's already at the root of project
– Racoon
Nov 16 '18 at 12:08
edited question.
– Racoon
Nov 16 '18 at 12:14
you took it into account "the register must match AppTgHelpers => project/TgHelpers" ?
– Yaroslaw
Nov 16 '18 at 12:16
not sure that completely understood you question, but, i suppose, yes
– Racoon
Nov 16 '18 at 12:18
1
The tgHelpers folder should be called TgHelpers if the namespace is TgHelpers
– Yaroslaw
Nov 16 '18 at 12:24
|
show 1 more comment
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53337484%2fprs-4-why-does-class-app-tghelpers-telegramcommandsprocess-not-found%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
the register must match AppTgHelpers => project/TgHelpers
,
composer.json
should be at the root of your project
project/
tgHelpers/
TelegramCommandsProcess.php
Handler.php
composer.json
vendor/
autoload.php
In Handler.php
require __DIR__ . '/../vendor/autoload.php';
but it's already at the root of project
– Racoon
Nov 16 '18 at 12:08
edited question.
– Racoon
Nov 16 '18 at 12:14
you took it into account "the register must match AppTgHelpers => project/TgHelpers" ?
– Yaroslaw
Nov 16 '18 at 12:16
not sure that completely understood you question, but, i suppose, yes
– Racoon
Nov 16 '18 at 12:18
1
The tgHelpers folder should be called TgHelpers if the namespace is TgHelpers
– Yaroslaw
Nov 16 '18 at 12:24
|
show 1 more comment
the register must match AppTgHelpers => project/TgHelpers
,
composer.json
should be at the root of your project
project/
tgHelpers/
TelegramCommandsProcess.php
Handler.php
composer.json
vendor/
autoload.php
In Handler.php
require __DIR__ . '/../vendor/autoload.php';
but it's already at the root of project
– Racoon
Nov 16 '18 at 12:08
edited question.
– Racoon
Nov 16 '18 at 12:14
you took it into account "the register must match AppTgHelpers => project/TgHelpers" ?
– Yaroslaw
Nov 16 '18 at 12:16
not sure that completely understood you question, but, i suppose, yes
– Racoon
Nov 16 '18 at 12:18
1
The tgHelpers folder should be called TgHelpers if the namespace is TgHelpers
– Yaroslaw
Nov 16 '18 at 12:24
|
show 1 more comment
the register must match AppTgHelpers => project/TgHelpers
,
composer.json
should be at the root of your project
project/
tgHelpers/
TelegramCommandsProcess.php
Handler.php
composer.json
vendor/
autoload.php
In Handler.php
require __DIR__ . '/../vendor/autoload.php';
the register must match AppTgHelpers => project/TgHelpers
,
composer.json
should be at the root of your project
project/
tgHelpers/
TelegramCommandsProcess.php
Handler.php
composer.json
vendor/
autoload.php
In Handler.php
require __DIR__ . '/../vendor/autoload.php';
edited Nov 16 '18 at 12:10
answered Nov 16 '18 at 12:07
YaroslawYaroslaw
834
834
but it's already at the root of project
– Racoon
Nov 16 '18 at 12:08
edited question.
– Racoon
Nov 16 '18 at 12:14
you took it into account "the register must match AppTgHelpers => project/TgHelpers" ?
– Yaroslaw
Nov 16 '18 at 12:16
not sure that completely understood you question, but, i suppose, yes
– Racoon
Nov 16 '18 at 12:18
1
The tgHelpers folder should be called TgHelpers if the namespace is TgHelpers
– Yaroslaw
Nov 16 '18 at 12:24
|
show 1 more comment
but it's already at the root of project
– Racoon
Nov 16 '18 at 12:08
edited question.
– Racoon
Nov 16 '18 at 12:14
you took it into account "the register must match AppTgHelpers => project/TgHelpers" ?
– Yaroslaw
Nov 16 '18 at 12:16
not sure that completely understood you question, but, i suppose, yes
– Racoon
Nov 16 '18 at 12:18
1
The tgHelpers folder should be called TgHelpers if the namespace is TgHelpers
– Yaroslaw
Nov 16 '18 at 12:24
but it's already at the root of project
– Racoon
Nov 16 '18 at 12:08
but it's already at the root of project
– Racoon
Nov 16 '18 at 12:08
edited question.
– Racoon
Nov 16 '18 at 12:14
edited question.
– Racoon
Nov 16 '18 at 12:14
you took it into account "the register must match AppTgHelpers => project/TgHelpers" ?
– Yaroslaw
Nov 16 '18 at 12:16
you took it into account "the register must match AppTgHelpers => project/TgHelpers" ?
– Yaroslaw
Nov 16 '18 at 12:16
not sure that completely understood you question, but, i suppose, yes
– Racoon
Nov 16 '18 at 12:18
not sure that completely understood you question, but, i suppose, yes
– Racoon
Nov 16 '18 at 12:18
1
1
The tgHelpers folder should be called TgHelpers if the namespace is TgHelpers
– Yaroslaw
Nov 16 '18 at 12:24
The tgHelpers folder should be called TgHelpers if the namespace is TgHelpers
– Yaroslaw
Nov 16 '18 at 12:24
|
show 1 more comment
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53337484%2fprs-4-why-does-class-app-tghelpers-telegramcommandsprocess-not-found%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Can you try with use AppTgHelpersTelegramCommandsProcess; instead of use AppTgHelpersTelegramCommandsProcess;
– Web Artisan
Nov 16 '18 at 12:07
@WebArtisan, already tried. Result is the same
– Racoon
Nov 16 '18 at 12:08