Giter Club home page Giter Club logo

view's People

Contributors

arhell avatar dependabot-preview[bot] avatar dependabot[bot] avatar desure85 avatar devanych avatar dplusg avatar fantom409 avatar gerych1984 avatar hiqsol avatar kamarton avatar kaznovac avatar luizcmarin avatar machour avatar mister-42 avatar mj4444ru avatar razonyang avatar roxblnfk avatar rustamwin avatar samdark avatar sankaest avatar sanmai avatar skugarev avatar stylecibot avatar terabytesoftw avatar thenotsoft avatar tigrov avatar viktorprogger avatar vjik avatar xepozz avatar yiiliveext avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

view's Issues

Remove $autogenerate from Widget::getId()

This is a thing that comes back on regular base. When overriding Widget::getId(), adding the functions interface is required ($autoGenerate = true). This adds confusion when overriding as you are setting a ID yourself and autoGenerate is not required (but is still visible everywhere).

Since getId() is such a general function, I would prefer to have it as clean as possible. Isnt it possible to move the autogeneration logic to another method.

View class with irrelevant url manipulation

What steps will reproduce the problem?

I don't think the View class should deal with URL manipulations. URL with // prefix is valid in HTML context.

'css' => [strncmp($url, '//', 2) === 0 ? $url : ltrim($url, '/')],

'js' => [strncmp($url, '//', 2) === 0 ? $url : ltrim($url, '/')],

What is the expected result?

Manipulate URL in AssetManager level (if needed)

What do you get instead?

Manipulate URL in View class level.

Q A
Version 3.0.x-dev
PHP version -
Operating system -

View: full name of constants

What steps will reproduce the problem?

The short name is irrelevant as the IDE autocomplete it out automatically.

public const POS_HEAD = 1;
/**
* The location of registered JavaScript code block or files.
* This means the location is at the beginning of the body section.
*/
public const POS_BEGIN = 2;
/**
* The location of registered JavaScript code block or files.
* This means the location is at the end of the body section.
*/
public const POS_END = 3;
/**
* The location of registered JavaScript code block.
* This means the JavaScript code block will be executed when HTML document composition is ready.
*/
public const POS_READY = 4;
/**
* The location of registered JavaScript code block.
* This means the JavaScript code block will be executed when HTML page is completely loaded.
*/
public const POS_LOAD = 5;
/**
* This is internally used as the placeholder for receiving the content registered for the head section.
*/
private const PH_HEAD = '<![CDATA[YII-BLOCK-HEAD]]>';
/**
* This is internally used as the placeholder for receiving the content registered for the beginning of the body
* section.
*/
private const PH_BODY_BEGIN = '<![CDATA[YII-BLOCK-BODY-BEGIN]]>';
/**
* This is internally used as the placeholder for receiving the content registered for the end of the body section.
*/
private const PH_BODY_END = '<![CDATA[YII-BLOCK-BODY-END]]>';

What is the expected result?

POSITION_HEAD
POSITION_LOAD
// ...
PLACEHOLDER_HEAD
// ...
Q A
Version 3.0.x-dev
PHP version -
Operating system -

yii\behaviors\CacheableWidgetBehavior cache widget problem

What steps will reproduce the problem?

widget cache not working properly when your widget have registerJs or registerCss in view
coz cache just keep for HTML result not for JS and CSS.

What is the expected result?

when widget run in cache condition will registerJs and registerCss

What do you get instead?

disable widget cache or manual cache for registerJs or registerCss

Additional info

Q A
Yii version 2.0.14
PHP version 5.6
Operating system mac

id confilicting in widgets

What steps will reproduce the problem?

when rendering widgets via ajax request there is probability that new loaded widget has conflict id with already existed widgets.

What is the expected result?

conflict in js based on this id is inevitable for example in ActiveForm validation.

What do you get instead?

use unique mechanism for generating Widget::autoIdPrefix

Additional info

Q A
Yii version 2.0.20
PHP version 7.1.22
Operating system OS X

Add Data to View

There are very few setData and getData functions in place of params like in yii2. In addition to string data (getBlock and setBlock), you need to store data in a free format (mainly for layout).

View renderer from db

Предлагаю чуть видоизменить View и Renderer, в частности вот этот момент:
https://github.com/yiisoft/yii2/blob/master/framework/base/View.php#L148
тут должно быть чтото типа

if ($this->renderer[$ext]->hasTemplate($view, $context)) {
    return $this->renderer[$ext]->renderTemplate($view, $params, $context);
}
throw new InvalidParamException;

предварительно нужно вычислить $ext

Это позволит писать свои renderers без расширения view, сейчас это нвозможно, к примеру если $view это не файл, а primary key в таблице, к примеру '//site/index.twig.db'

Dynamic content doesn't work in cached fragments

http://www.yiiframework.com/doc-2.0/guide-caching-fragment.html#dynamic-content
https://github.com/yiisoft/yii2/blob/master/docs/guide-ru/caching-fragment.md#Динамическое-содержимое-

Конфигурация:

'cache' => [
            'class' => 'yii\caching\FileCache',
            'keyPrefix' => 'myapp',
        ],

Проблема №1:

What steps will reproduce the problem?

Вьюшка:

<? $myVar = '123' ?>

<? if ($this->beginCache('tablecache', [
    'duration' => 3600,
])) : ?>

    <? echo $this->renderDynamic('return $myVar;');?>

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            'id',
            'name',
            'level',

            ['class' => 'yii\grid\ActionColumn'],
        ],
    ]); ?>

<? $this->endCache(); endif; ?>

What is the expected result?

Должно закешировать таблицу, кроме значения переменной myVar

What do you get instead?

Ошибка:

PHP Notice – yii\base\ErrorException
Undefined variable: myVar

Проблема №2:

<? if ($this->beginCache('tablecache', [
    'duration' => 3600,
])) : ?>

    <? echo $this->renderDynamic('return "123";');?>

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            'id',
            'name',
            'level',

            ['class' => 'yii\grid\ActionColumn'],
        ],
    ]); ?>

<? $this->endCache(); endif; ?>

Выводит без ошибок "123"

далее меняю c:
<? echo $this->renderDynamic('return "123";');?>
на:
<? echo $this->renderDynamic('return "321";');?>

все равно выводит "123"

Additional info

Q A
Yii version 2.0.8
PHP version 5.4.43
Operating system CentOS 6

Support Ajax

Now that I have your attention, please do not support Ajax. A lot of time will go into that, which can be spend much better. That being said, I do miss one specific option to support my Ajax implementation that I cannot bypass completely.

I render my Ajax replies currently with renderPartial, which has the slight drawback that registered javascript ($this->registerJs, $this->jsStrings, $this->jsVars) will not be included in the response. My request is to add a way to basically do renderPartialWithJavascript.

Clear viewFiles after context change

Good day. As we found out from this issue #188 - after user change context using method withContext, BaseView not cleans up
viewFiles property, and in sub view user context will be ignored. Can you clean this property or check $this->context before viewFiles. Thanks

Yii3 assets path not correctly reference if installed in subfolder

What steps will reproduce the problem?

install yii3 in a subfolder of an server

What is the expected result?

css and js file paths should include subfolder path.

What do you get instead?

css and js file paths not include subfolder path. reulut in css files not found.

Additional info

Q A
Yii version 3.0.?
PHP version 7.2
Operating system window 10

捕获

using "final" keyword on class definitions

Now all the classes of this package has keyword "final", what is the idea of this?
For example class "Theme" must provide theme path searching, why "BaseView" locked only for these realization of class, instead of accepting interface ? And here you locked the last chance of logic customization by "final" key.
Also "WebView" has the same restriction. What the way changing some of them, without fork? Class with more than 1000+ lines, is not flexible

View with separated positions for ajax

What steps will reproduce the problem?

Currently, View uses magical conditions to work correctly with ajax.

view/src/View/WebView.php

Lines 647 to 652 in 4e39cf8

* @param bool $ajaxMode whether the view is rendering in AJAX mode. If true, the JS scripts registered at
* [[POS_READY]] and [[POS_LOAD]] positions will be rendered at the end of the view like normal scripts.
*
* @return string the rendered content
*/
protected function renderBodyEndHtml(bool $ajaxMode): string

The problem with this is that scripts and css are often unnecessarily output when the page already contains it. It also causes errors and it should be explicitly planned that eg.

  • javascript variables should not be overwritten
  • do not duplicate events, doubling code runs and other issues.

What is the expected result?

Separate positions that allow you to (and css alternative)

  • only dom ready
  • loaded only
  • ajax loaded only
  • or a combination thereof

What do you get instead?

Currently, javascript should be designed so as not to cause a problem. Duplicate script and CSS files and contents are parsed after each ajax request.

I suggests

should be constant values ​​per bit.

registerJs('myScript();', POS_READY);  // dom ready
registerJs('myScript();', POS_AJAX);  // after ajax
registerJs('myScript();', POS_READY | POS_AJAX); // dom ready  + afer ajax
registerJs('myScript();', POS_LOAD | POS_AJAX); // loaded  + afer ajax
registerCss('div {...}', POS_HEAD);
registerCss('div {...}', POS_AJAX);
registerCss('div {...}', POS_HEAD | POS_AJAX);
Q A
Version 3.0.x-dev
PHP version -
Operating system -

WebView::registerJsVar with expression

What steps will reproduce the problem?

Like a yii2 JsExpression allow variable as complex js expression. For example

$webView->registerJsVar('a', new JsExpression('new Date()'));
$webView->registerJsVar('b', [
  'obj' => new JsExpression('new MyClass()')
  'apple' => 'apple-string',
  'element' => new JsExpression('$(".any")'),
]);
Q A
Version 3.0.x-dev
PHP version -
Operating system -

Add ability to render view from string

I can't find the way to render a view from string (not from file). I want to use template engine (Twig or Smarty) to render texts from templates stored in DB. For example, store email message template in DB table and generate email body from it on the fly.

Move some view properties to view state

ViewInterface immutable methods that modified properties:

withTheme()
withRenderers()
withLanguage()
withSourceLanguage()
withDefaultExtension()
withPlaceholderSalt()

We have to divide the properties modified by these methods into configurable once (usually in DI container config) and multiple times (DI container config + middleware for example).

Properties that are configured once must be changed immutable methods as they are now.

Properties that are configuraed multiple times should be saved in view state.

Suggest move to state theme and language (should we move to state source language?).

Consider removing logger dependencny

Logger dependency could be removed by moving the debug logging to BeforeRender event and removing it from View classes.

Ideally, it could be done for dev environment only.

WebView::renderAjax: event require view file, but in case of ajax not available

What steps will reproduce the problem?

WebView::renderAjax():

view/src/WebView.php

Lines 201 to 206 in d0fa214

$this->beginPage();
$this->head();
$this->beginBody();
echo $this->renderFile($viewFile, $params, $context);
$this->endBody();
$this->endPage(true);

Events:

$this->eventDispatcher->dispatch(new BodyBegin($this->getViewFile()));

$this->eventDispatcher->dispatch(new BodyEnd($this->getViewFile()));

$this->eventDispatcher->dispatch(new PageBegin($this->getViewFile()));

$this->eventDispatcher->dispatch(new PageEnd($this->getViewFile()));

What is the expected result?

Expected operation is not very clear for my.

  • not call event, OR
  • event allow null as view file.

What do you get instead?

TypeError: Argument 1 passed to Yiisoft\View\Event\ViewEvent::__construct() must be of the type string, bool given...

Additional info

Q A
Version 3.0.x-dev
PHP version -
Operating system -

View and WebView: events not present sender

What steps will reproduce the problem?

In Yii2, the event sender was available, which is very useful if event-based processes want to modify the sender, e.g. Add CSS, JS.

https://www.yiiframework.com/doc/api/2.0/yii-base-event#$sender-detail

The $sender property describes who raises the event.

What is the expected result?

The sender object is accessible.

What do you get instead?

Do I need to create a separate dispatcher? This makes the process complicated if I have to use it multiple times and the process is only partially different, e.g. create email template and create web response in one request.

Q A
Version 3.0.x-dev
PHP version -
Operating system -

Connecting styles from the file inline

I need to create an email with styles. These styles are also used elsewhere, and there are quite a few of them, so I would not want to write them inline, but for email this is the only option, because mail clients remove all non-inline styles. Why do not I find anything like Html::styleFromFileToInline($filename)? Add this please!

Ability to override script type in registerJs()

I have a dynamically generated JSON-LD markup that needs to be registered in a head section with "application/ld+json" script type:

<script type="application/ld+json">...</script>

How can I achieve this? I think registerJs method should provide the ability to override script type, much like you can do in registerJsFile by passing options array with type in it .

Concept: finalize View and WebView class

Variant 1

  1. Create trait ViewTrait with content from View class and mark him as @internal.
  2. View class only use ViewTrait and finalized.
  3. WebView class not extends View but use ViewTrait and finalized.

Variant 2

  1. Create class BaseView with content from View class and mark him as @internal.
  2. View extends BaseView and finalized.
  3. WebView extends BaseView and finalized.

I like variant 2.

WebView in widgets

Доброго дня. Столкнулся с такой проблемой/ошибкой. Сильно упрощенная версия моего виджета, который должен отрендерить форму:

<?php
declare(strict_types=1);

namespace App\Front\Source\Widget\Data;

use Yiisoft\View\ViewContextInterface;
use Yiisoft\View\WebView;
use Yiisoft\Assets\AssetManager;
use Yiisoft\Widget\Widget;

final class SearchFormWidget extends Widget implements ViewContextInterface
{
       private WebView $view;
       private AssetManager $assetManager;

       public function __construct(WebView $view, AssetManager $assetManager)
       {
              $this->view = $view;
              $this->assetManager = $assetManager;
       }

       public function getViewPath(): string
       {
              return __DIR__ . DIRECTORY_SEPARATOR . 'views'; //Вьюха лежит рядом с виджетом
       }

      protected function run(): string
      {
               return $this->view->withContext($this)->render('search-form');
      }

       protected function afterRun(string $result): string
       {
              // $this->assetManager->register([Какой-то-ассет::class]);
              $this->view->registerJs('Какой-то js код' . PHP_EOL);
              
              return parent::afterRun($result);
       }
}

Собственно проблема следующая:

  1. Если вызвать виджет так echo SearchFormWidget::widget(); (т.е. WebView попадает через DI), то форма рендерится нормально (метод run), но вызовы registerJs ничего не выводят в лэйауте
  2. Если принудительно вызвать с текущим WebView
echo SearchFormWidget::widget([
    '__construct()' => [
        'view' => $this
    ]
]);

то игнорируется указанный контекст и вью-файл ищется относительно директории указанной в настройках.

На данный момент закостылил таким образом

 public function __construct(WebView $view, WebView $innerView, AssetManager $assetManager)

соответственно

  1. $view - указываю я для вызовов registerJs
  2. $innerView - через DI, для рендера формы в указанном контексте.

Заранее благодарен

View::PLACEHOLDER_* hack

What steps will reproduce the problem?

The framework level does not cover placeholder protection.

If, for example, I have an HTML content input form, then the placeholder can be inserted in it, in this case the rendered result will be wrong and it will require find a long time for developers to find out why the page design has crashed.

private const PH_HEAD = '<![CDATA[YII-BLOCK-HEAD]]>';
/**
* This is internally used as the placeholder for receiving the content registered for the beginning of the body
* section.
*/
private const PH_BODY_BEGIN = '<![CDATA[YII-BLOCK-BODY-BEGIN]]>';
/**
* This is internally used as the placeholder for receiving the content registered for the end of the body section.
*/
private const PH_BODY_END = '<![CDATA[YII-BLOCK-BODY-END]]>';

What is the expected result?

placeholder protection is automatic or provide helper for protection.

What do you get instead?

placeholder is injectable.

I suggests

Instead of constants, it should be a variable that always contains a random string.

$placeholderbodybegin = '<![CDATA[YII-BLOCK-BODY-BEGIN-'.$uniqueRandomHash.']]>';
Q A
Version 3.0.x-dev
PHP version -
Operating system -

Eliminate the core framework from all default style of frontend (bootstrap 3) framework

For 2.1 version, I think the core framework must clean from bootstrap style especially in default variable config, what I see :

Have a default bootstrap class style,
From beginner thinking, yii 2 is framework for bootsrap 3, because the html class or style is write for this framework by default not pure html, in yii 2.1 this framework must provide enlightenment to beginner that this framework can be used for all html pure/frameworks

For example,

  • ActionColumn : have default value icon a part of Bootstrap glyphicon
  • GridView : have a default variable class 'table table-striped table-bordered' who only bootstrap needed, not pure html need
  • ActiveForm : errorCssClass (has-error), successCssClass(has-success)
  • ActiveField : default variable in style, container, etc like 'form-group, form-control' is write by default.
  • Etc

I'm a bootstrap fan may be (truly) helpful for this, but when used on another ui framework it will all be useless

Error in swagger-ui because of latest changes in yiisoft/view

What steps will reproduce the problem?

I upgraded my packages with composer update. It upgraded yiisoft/view to hash 2d8d972. It broke swagger ui for me in app-api project.

What is the expected result?

It should show swagger ui.

What do you get instead?

TypeError: call_user_func_array(): Argument #1 ($function) must be a valid callback, class Yiisoft\View\WebView does not have a method "withDefaultParameters" in /app/vendor/yiisoft/factory/src/Definition/ArrayDefinitionBuilder.php:67
Stack trace:
#0 /app/vendor/yiisoft/factory/src/Definition/ArrayDefinition.php(129): Yiisoft\Factory\Definition\ArrayDefinitionBuilder->build(Object(Yiisoft\Di\Container), Object(Yiisoft\Factory\Definition\ArrayDefinition))
#1 /app/vendor/yiisoft/di/src/Container.php(371): Yiisoft\Factory\Definition\ArrayDefinition->resolve(Object(Yiisoft\Di\Container))
#2 /app/vendor/yiisoft/di/src/Container.php(319): Yiisoft\Di\Container->buildInternal('Yiisoft\\View\\We...')
#3 /app/vendor/yiisoft/di/src/Container.php(145): Yiisoft\Di\Container->build('Yiisoft\\View\\We...')
#4 /app/vendor/yiisoft/factory/src/Definition/ClassDefinition.php(46): Yiisoft\Di\Container->get('Yiisoft\\View\\We...')
#5 /app/vendor/yiisoft/factory/src/Definition/DefinitionResolver.php(55): Yiisoft\Factory\Definition\ClassDefinition->resolve(Object(Yiisoft\Di\Container))
#6 /app/vendor/yiisoft/factory/src/Definition/DefinitionResolver.php(38): Yiisoft\Factory\Definition\DefinitionResolver::resolve(Object(Yiisoft\Di\Container), Object(Yiisoft\Factory\Definition\ClassDefinition))
#7 /app/vendor/yiisoft/factory/src/Definition/ArrayDefinitionBuilder.php(54): Yiisoft\Factory\Definition\DefinitionResolver::resolveArray(Object(Yiisoft\Di\Container), Array)
#8 /app/vendor/yiisoft/factory/src/Definition/ArrayDefinition.php(129): Yiisoft\Factory\Definition\ArrayDefinitionBuilder->build(Object(Yiisoft\Di\Container), Object(Yiisoft\Factory\Definition\ArrayDefinition))
#9 /app/vendor/yiisoft/di/src/Container.php(371): Yiisoft\Factory\Definition\ArrayDefinition->resolve(Object(Yiisoft\Di\Container))
#10 /app/vendor/yiisoft/di/src/Container.php(319): Yiisoft\Di\Container->buildInternal('Yiisoft\\Yii\\Vie...')
#11 /app/vendor/yiisoft/di/src/Container.php(145): Yiisoft\Di\Container->build('Yiisoft\\Yii\\Vie...')
#12 /app/vendor/yiisoft/factory/src/Definition/ClassDefinition.php(46): Yiisoft\Di\Container->get('Yiisoft\\Yii\\Vie...')
#13 /app/vendor/yiisoft/factory/src/Definition/DefinitionResolver.php(55): Yiisoft\Factory\Definition\ClassDefinition->resolve(Object(Yiisoft\Di\Container))
#14 /app/vendor/yiisoft/factory/src/Definition/DefinitionResolver.php(38): Yiisoft\Factory\Definition\DefinitionResolver::resolve(Object(Yiisoft\Di\Container), Object(Yiisoft\Factory\Definition\ClassDefinition))
#15 /app/vendor/yiisoft/factory/src/Definition/ArrayDefinitionBuilder.php(54): Yiisoft\Factory\Definition\DefinitionResolver::resolveArray(Object(Yiisoft\Di\Container), Array)
#16 /app/vendor/yiisoft/factory/src/Definition/ArrayDefinition.php(129): Yiisoft\Factory\Definition\ArrayDefinitionBuilder->build(Object(Yiisoft\Di\Container), Object(Yiisoft\Factory\Definition\ArrayDefinition))
#17 /app/vendor/yiisoft/di/src/Container.php(387): Yiisoft\Factory\Definition\ArrayDefinition->resolve(Object(Yiisoft\Di\Container))
#18 /app/vendor/yiisoft/di/src/Container.php(366): Yiisoft\Di\Container->buildPrimitive('Yiisoft\\Swagger...')
#19 /app/vendor/yiisoft/di/src/Container.php(319): Yiisoft\Di\Container->buildInternal('Yiisoft\\Swagger...')
#20 /app/vendor/yiisoft/di/src/Container.php(145): Yiisoft\Di\Container->build('Yiisoft\\Swagger...')
#21 /app/vendor/yiisoft/injector/src/Injector.php(267): Yiisoft\Di\Container->get('Yiisoft\\Swagger...')
#22 /app/vendor/yiisoft/injector/src/Injector.php(248): Yiisoft\Injector\Injector->resolveObjectParameter(Object(Yiisoft\Injector\ResolvingState), 'Yiisoft\\Swagger...', false)
#23 /app/vendor/yiisoft/injector/src/Injector.php(199): Yiisoft\Injector\Injector->resolveNamedType(Object(Yiisoft\Injector\ResolvingState), Object(ReflectionNamedType), false)
#24 /app/vendor/yiisoft/injector/src/Injector.php(150): Yiisoft\Injector\Injector->resolveParameter(Object(ReflectionParameter), Object(Yiisoft\Injector\ResolvingState))
#25 /app/vendor/yiisoft/injector/src/Injector.php(66): Yiisoft\Injector\Injector->resolveDependencies(Object(ReflectionFunction), Array)
#26 /app/vendor/yiisoft/request-model/src/CallableWrapper.php(40): Yiisoft\Injector\Injector->invoke(Object(Closure), Array)
#27 /app/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(88): Yiisoft\RequestModel\CallableWrapper->process(Object(HttpSoft\Message\ServerRequest), Object(App\NotFoundHandler))
#28 /app/vendor/yiisoft/data-response/src/Middleware/FormatDataResponse.php(25): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(HttpSoft\Message\ServerRequest))
#29 /app/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(88): Yiisoft\DataResponse\Middleware\FormatDataResponse->process(Object(HttpSoft\Message\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#30 /app/src/Middleware/ExceptionMiddleware.php(28): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(HttpSoft\Message\ServerRequest))
#31 /app/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(88): App\Middleware\ExceptionMiddleware->process(Object(HttpSoft\Message\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#32 /app/vendor/yiisoft/data-response/src/Middleware/FormatDataResponse.php(25): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(HttpSoft\Message\ServerRequest))
#33 /app/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(88): Yiisoft\DataResponse\Middleware\FormatDataResponse->process(Object(HttpSoft\Message\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#34 /app/vendor/yiisoft/request-body-parser/src/RequestBodyParser.php(130): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(HttpSoft\Message\ServerRequest))
#35 /app/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(88): Yiisoft\Request\Body\RequestBodyParser->process(Object(HttpSoft\Message\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#36 /app/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(53): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(HttpSoft\Message\ServerRequest))
#37 /app/vendor/yiisoft/middleware-dispatcher/src/MiddlewareDispatcher.php(40): Yiisoft\Middleware\Dispatcher\MiddlewareStack->handle(Object(HttpSoft\Message\ServerRequest))
#38 /app/vendor/yiisoft/router/src/MatchingResult.php(81): Yiisoft\Middleware\Dispatcher\MiddlewareDispatcher->dispatch(Object(HttpSoft\Message\ServerRequest), Object(App\NotFoundHandler))
#39 /app/vendor/yiisoft/router/src/Middleware/Router.php(46): Yiisoft\Router\MatchingResult->process(Object(HttpSoft\Message\ServerRequest), Object(App\NotFoundHandler))
#40 /app/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(88): Yiisoft\Router\Middleware\Router->process(Object(HttpSoft\Message\ServerRequest), Object(App\NotFoundHandler))
#41 /app/vendor/yiisoft/yii-web/src/Middleware/SubFolder.php(75): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(HttpSoft\Message\ServerRequest))
#42 /app/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(88): Yiisoft\Yii\Web\Middleware\SubFolder->process(Object(HttpSoft\Message\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#43 /app/vendor/yiisoft/error-handler/src/Middleware/ErrorCatcher.php(135): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(HttpSoft\Message\ServerRequest))
#44 /app/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(88): Yiisoft\ErrorHandler\Middleware\ErrorCatcher->process(Object(HttpSoft\Message\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#45 /app/vendor/yiisoft/middleware-dispatcher/src/MiddlewareStack.php(53): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(HttpSoft\Message\ServerRequest))
#46 /app/vendor/yiisoft/middleware-dispatcher/src/MiddlewareDispatcher.php(40): Yiisoft\Middleware\Dispatcher\MiddlewareStack->handle(Object(HttpSoft\Message\ServerRequest))
#47 /app/vendor/yiisoft/yii-web/src/Application.php(57): Yiisoft\Middleware\Dispatcher\MiddlewareDispatcher->dispatch(Object(HttpSoft\Message\ServerRequest), Object(App\NotFoundHandler))
#48 /app/src/ApplicationRunner.php(75): Yiisoft\Yii\Web\Application->handle(Object(HttpSoft\Message\ServerRequest))
#49 /app/public/index.php(26): App\ApplicationRunner->run()
#50 {main}

Additional info

Q A
Version yii3
PHP version 8.0.3
Operating system ubuntu

Wrong namespaces

  1. Sources of package view have wrong namespace. One two three

  2. Tests of package view have wrong namespace. One two three four

Just missed package prefix

What is the expected result?

The package namespace starts with YIisoft\View\ for sources and Yiisoft\View\Tests\ for tests

What do you get instead?

Chaos in namespace

Additional info

Q A
Version 3.0
Depends on https://github.com/yiisoft/view/issues/55

Make theme in the view class optional

Now Theme required in constructor of View class.

It will be better if we remove Theme from constructor and create new method for set Theme.
Also can conside create interface for Theme which will be used in View.

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.